From 4429e2f58c5ff3174c6b745e4c322ad790eb2f05 Mon Sep 17 00:00:00 2001 From: enahum Date: Mon, 27 Feb 2017 16:26:38 -0300 Subject: PLT-5396 Fix team mention badge persistance (#5543) --- webapp/actions/global_actions.jsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'webapp/actions') 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); -- cgit v1.2.3-1-g7c22