diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-01-10 16:17:22 -0500 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-01-10 16:17:22 -0500 |
commit | 04893cbe7cf97c9ed820fc85a4d32ef61efce558 (patch) | |
tree | 16311be933bae5a64ae76689a11002bdf5ed0f1a /webapp/actions/global_actions.jsx | |
parent | 5be99e1f85fff344485b6750be43a3506d8f8341 (diff) | |
download | chat-04893cbe7cf97c9ed820fc85a4d32ef61efce558.tar.gz chat-04893cbe7cf97c9ed820fc85a4d32ef61efce558.tar.bz2 chat-04893cbe7cf97c9ed820fc85a4d32ef61efce558.zip |
Reset unread counts for channels being switched to/away (#5037)
Diffstat (limited to 'webapp/actions/global_actions.jsx')
-rw-r--r-- | webapp/actions/global_actions.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
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({ |