summaryrefslogtreecommitdiffstats
path: root/webapp/actions
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2017-02-27 16:26:38 -0300
committerCorey Hulen <corey@hulen.com>2017-02-27 14:26:38 -0500
commit4429e2f58c5ff3174c6b745e4c322ad790eb2f05 (patch)
treefd4530ef41b83d6133756e4bbeb5704f326bad7d /webapp/actions
parentb5ffdf5c5490ad1ac97ecb2725af878cda61810b (diff)
downloadchat-4429e2f58c5ff3174c6b745e4c322ad790eb2f05.tar.gz
chat-4429e2f58c5ff3174c6b745e4c322ad790eb2f05.tar.bz2
chat-4429e2f58c5ff3174c6b745e4c322ad790eb2f05.zip
PLT-5396 Fix team mention badge persistance (#5543)
Diffstat (limited to 'webapp/actions')
-rw-r--r--webapp/actions/global_actions.jsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx
index efff5076a..37020f500 100644
--- a/webapp/actions/global_actions.jsx
+++ b/webapp/actions/global_actions.jsx
@@ -55,6 +55,10 @@ export function emitChannelClickEvent(channel) {
loadPosts(chan.id);
});
+ // Subtract mentions for the team
+ const {msgs, mentions} = ChannelStore.getUnreadCounts()[chan.id] || {msgs: 0, mentions: 0};
+ TeamStore.subtractUnread(chan.team_id, msgs, mentions);
+
// Mark previous and next channel as read
ChannelStore.resetCounts(oldChannelId);
ChannelStore.resetCounts(chan.id);