summaryrefslogtreecommitdiffstats
path: root/web/react/components
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-05 10:32:48 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-05 10:32:48 -0500
commit9ed37125e9be87fe88c6a1ee65b31bbb4de81c5a (patch)
tree887768bcb5c6468d3a206486f48440a6089fd8c2 /web/react/components
parent36174aed88873f7d7cbc6023207290995850d6f7 (diff)
parentd48b305661a2f40cc3e26593fefc7ce7bca6e320 (diff)
downloadchat-9ed37125e9be87fe88c6a1ee65b31bbb4de81c5a.tar.gz
chat-9ed37125e9be87fe88c6a1ee65b31bbb4de81c5a.tar.bz2
chat-9ed37125e9be87fe88c6a1ee65b31bbb4de81c5a.zip
Merge pull request #1311 from mattermost/plt-981
PLT-981 Only show * in tab title when a channel is marked unread
Diffstat (limited to 'web/react/components')
-rw-r--r--web/react/components/sidebar.jsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx
index aab9919a4..8b5f7a381 100644
--- a/web/react/components/sidebar.jsx
+++ b/web/react/components/sidebar.jsx
@@ -20,6 +20,7 @@ const Utils = require('../utils/utils.jsx');
const Constants = require('../utils/constants.jsx');
const Preferences = Constants.Preferences;
const TutorialSteps = Constants.TutorialSteps;
+const NotificationPrefs = Constants.NotificationPrefs;
const Tooltip = ReactBootstrap.Tooltip;
const OverlayTrigger = ReactBootstrap.OverlayTrigger;
@@ -76,6 +77,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 === NotificationPrefs.MENTION) {
+ chUnreadCount = 0;
}
channelUnreadCounts[ch.id] = {msgs: chUnreadCount, mentions: chMentionCount};
@@ -362,7 +365,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) {