Remove unneeded return and add logging for marking channels unread (#6788)
Этот коммит содержится в:
коммит произвёл
enahum
родитель
c6602ae2b8
Коммит
2a96b7e15e
@@ -448,7 +448,8 @@ class ChannelStoreClass extends EventEmitter {
|
|||||||
|
|
||||||
incrementMessages(id, markRead = false) {
|
incrementMessages(id, markRead = false) {
|
||||||
if (!this.unreadCounts[id]) {
|
if (!this.unreadCounts[id]) {
|
||||||
return;
|
// Should never happen
|
||||||
|
console.log(`Missing channel_id=${id} in unreads object`); //eslint-disable-line no-console
|
||||||
}
|
}
|
||||||
|
|
||||||
const member = this.getMyMember(id);
|
const member = this.getMyMember(id);
|
||||||
@@ -483,11 +484,11 @@ class ChannelStoreClass extends EventEmitter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!this.unreadCounts[id]) {
|
if (!this.unreadCounts[id]) {
|
||||||
return;
|
// Should never happen
|
||||||
|
console.log(`Missing channel_id=${id} in unreads object`); //eslint-disable-line no-console
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mentions.indexOf(UserStore.getCurrentId()) !== -1) {
|
if (mentions.indexOf(UserStore.getCurrentId()) !== -1) {
|
||||||
this.unreadCounts[id].mentions++;
|
|
||||||
const member = {...this.getMyMember(id)};
|
const member = {...this.getMyMember(id)};
|
||||||
member.mention_count++;
|
member.mention_count++;
|
||||||
store.dispatch({
|
store.dispatch({
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user