From f3b0ae64ff0f277aa87b22a88d8e2c97a81f5fd4 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Thu, 5 Nov 2015 09:39:07 -0500 Subject: Only show * in tab title when a channel is marked unread --- web/react/components/sidebar.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'web/react') 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) { -- cgit v1.2.3-1-g7c22