diff options
author | Joram Wilander <jwawilander@gmail.com> | 2016-02-09 11:52:20 -0500 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-02-09 11:52:20 -0500 |
commit | 8b70a55e40ff5bdbce2247e08b0dcd064fae02f5 (patch) | |
tree | 96a0301cd5e71b6f068d6048c2ac3e85328a4faf /web/react/stores/channel_store.jsx | |
parent | 7ba50278d380733a8e85c8c057a3b5e5c1477ba2 (diff) | |
parent | 0d50cdd390198d18c3298be5cafc39dfd4d67bbd (diff) | |
download | chat-8b70a55e40ff5bdbce2247e08b0dcd064fae02f5.tar.gz chat-8b70a55e40ff5bdbce2247e08b0dcd064fae02f5.tar.bz2 chat-8b70a55e40ff5bdbce2247e08b0dcd064fae02f5.zip |
Merge pull request #2115 from mattermost/plt-1506
PLT-1506 Fixing mentions for inactive browser tabs.
Diffstat (limited to 'web/react/stores/channel_store.jsx')
-rw-r--r-- | web/react/stores/channel_store.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/react/stores/channel_store.jsx b/web/react/stores/channel_store.jsx index d650b23c2..ac800a988 100644 --- a/web/react/stores/channel_store.jsx +++ b/web/react/stores/channel_store.jsx @@ -308,7 +308,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => { ChannelStore.storeChannels(action.channels); ChannelStore.storeChannelMembers(action.members); currentId = ChannelStore.getCurrentId(); - if (currentId) { + if (currentId && !document.hidden) { ChannelStore.resetCounts(currentId); } ChannelStore.setUnreadCounts(); @@ -321,7 +321,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => { ChannelStore.pStoreChannelMember(action.member); } currentId = ChannelStore.getCurrentId(); - if (currentId) { + if (currentId && !document.hidden) { ChannelStore.resetCounts(currentId); } ChannelStore.setUnreadCount(action.channel.id); |