diff options
author | JoramWilander <jwawilander@gmail.com> | 2015-11-05 09:39:07 -0500 |
---|---|---|
committer | JoramWilander <jwawilander@gmail.com> | 2015-11-05 09:39:07 -0500 |
commit | f3b0ae64ff0f277aa87b22a88d8e2c97a81f5fd4 (patch) | |
tree | ac0df48c7267da0f1b5e2b5ef52d78705a43542d /web/react/components | |
parent | 2c2775e22179942ff30bbabd9cc864012fee5fb5 (diff) | |
download | chat-f3b0ae64ff0f277aa87b22a88d8e2c97a81f5fd4.tar.gz chat-f3b0ae64ff0f277aa87b22a88d8e2c97a81f5fd4.tar.bz2 chat-f3b0ae64ff0f277aa87b22a88d8e2c97a81f5fd4.zip |
Only show * in tab title when a channel is marked unread
Diffstat (limited to 'web/react/components')
-rw-r--r-- | web/react/components/sidebar.jsx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index aab9919a4..0f02003b6 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -76,6 +76,8 @@ export default class Sidebar extends React.Component { if (ch.type === 'D') { chMentionCount = chUnreadCount; chUnreadCount = 0; + } else if (chMember.notify_props && chMember.notify_props.mark_unread === 'mention') { + chUnreadCount = 0; } channelUnreadCounts[ch.id] = {msgs: chUnreadCount, mentions: chMentionCount}; @@ -362,7 +364,7 @@ export default class Sidebar extends React.Component { var unread = false; if (channelMember) { msgCount = unreadCount.msgs + unreadCount.mentions; - unread = (msgCount > 0 && channelMember.notify_props.mark_unread !== 'mention') || channelMember.mention_count > 0; + unread = msgCount > 0 || channelMember.mention_count > 0; } if (unread) { |