summaryrefslogtreecommitdiffstats
path: root/web/react/components/sidebar.jsx
diff options
context:
space:
mode:
authorJoramWilander <jwawilander@gmail.com>2015-11-05 09:39:07 -0500
committerJoramWilander <jwawilander@gmail.com>2015-11-05 09:39:07 -0500
commitf3b0ae64ff0f277aa87b22a88d8e2c97a81f5fd4 (patch)
treeac0df48c7267da0f1b5e2b5ef52d78705a43542d /web/react/components/sidebar.jsx
parent2c2775e22179942ff30bbabd9cc864012fee5fb5 (diff)
downloadchat-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/sidebar.jsx')
-rw-r--r--web/react/components/sidebar.jsx4
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) {