summaryrefslogtreecommitdiffstats
path: root/webapp/stores/channel_store.jsx
diff options
context:
space:
mode:
authorDavid Lu <david.lu97@outlook.com>2016-10-14 09:17:25 -0400
committerenahum <nahumhbl@gmail.com>2016-10-14 10:17:25 -0300
commite18e41d29d32ae8e3e7879765a403f552e85af1f (patch)
tree79b1bb557a3e72439f73c8dddc6e6cc7ae8dd768 /webapp/stores/channel_store.jsx
parentf555f104c1aca3d94dffa2eb7683971ee6ac236f (diff)
downloadchat-e18e41d29d32ae8e3e7879765a403f552e85af1f.tar.gz
chat-e18e41d29d32ae8e3e7879765a403f552e85af1f.tar.bz2
chat-e18e41d29d32ae8e3e7879765a403f552e85af1f.zip
Fixing marking channels unread, again (#4215)
* Fixing marking channels unread, again * Update channel_store.jsx
Diffstat (limited to 'webapp/stores/channel_store.jsx')
-rw-r--r--webapp/stores/channel_store.jsx7
1 files changed, 2 insertions, 5 deletions
diff --git a/webapp/stores/channel_store.jsx b/webapp/stores/channel_store.jsx
index ec5ce7758..1870ad15b 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;
}