summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/sidebar.jsx5
-rw-r--r--web/react/utils/constants.jsx3
2 files changed, 7 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) {
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 7d885681a..58ee8e2d2 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -384,5 +384,8 @@ module.exports = {
BOTTOM: 1,
POST: 2,
SIDEBAR_OPEN: 3
+ },
+ NotificationPrefs: {
+ MENTION: 'mention'
}
};