From 04893cbe7cf97c9ed820fc85a4d32ef61efce558 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Tue, 10 Jan 2017 16:17:22 -0500 Subject: Reset unread counts for channels being switched to/away (#5037) --- webapp/actions/global_actions.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/webapp/actions/global_actions.jsx b/webapp/actions/global_actions.jsx index 8542a0c92..ea077d6eb 100644 --- a/webapp/actions/global_actions.jsx +++ b/webapp/actions/global_actions.jsx @@ -55,6 +55,10 @@ export function emitChannelClickEvent(channel) { trackPage(); }); + // Mark previous and next channel as read + ChannelStore.resetCounts(ChannelStore.getCurrentId()); + ChannelStore.resetCounts(chan.id); + BrowserStore.setGlobalItem(chan.team_id, chan.id); AppDispatcher.handleViewAction({ -- cgit v1.2.3-1-g7c22