From e18e41d29d32ae8e3e7879765a403f552e85af1f Mon Sep 17 00:00:00 2001 From: David Lu Date: Fri, 14 Oct 2016 09:17:25 -0400 Subject: [PATCH] Fixing marking channels unread, again (#4215) * Fixing marking channels unread, again * Update channel_store.jsx --- webapp/stores/channel_store.jsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx index ec5ce77588..1870ad15b9 100644 --- a/webapp/stores/channel_store.jsx +++ b/webapp/stores/channel_store.jsx @@ -325,13 +325,10 @@ class ChannelStoreClass extends EventEmitter { const ch = this.get(id); const chMember = this.getMember(id); - let chMentionCount = chMember.mention_count; + const chMentionCount = chMember.mention_count; let chUnreadCount = ch.total_msg_count - chMember.msg_count; - // Temporary workaround for DM channels having wrong unread values - if (ch.type === 'D') { - chMentionCount = 0; - } else if (chMember.notify_props && chMember.notify_props.mark_unread === NotificationPrefs.MENTION) { + if (chMember.notify_props && chMember.notify_props.mark_unread === NotificationPrefs.MENTION) { chUnreadCount = 0; }