Remove unneeded return and add logging for marking channels unread (#6788)

This commit is contained in:
Joram Wilander
2017-06-28 20:56:14 -04:00
committed by enahum
parent c6602ae2b8
commit 2a96b7e15e

View File

@@ -448,7 +448,8 @@ class ChannelStoreClass extends EventEmitter {
incrementMessages(id, markRead = false) {
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);
@@ -483,11 +484,11 @@ class ChannelStoreClass extends EventEmitter {
}
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) {
this.unreadCounts[id].mentions++;
const member = {...this.getMyMember(id)};
member.mention_count++;
store.dispatch({