From 0d50cdd390198d18c3298be5cafc39dfd4d67bbd Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Tue, 9 Feb 2016 11:09:29 -0500 Subject: Changing meation behaviour to show meantion when viewing channel but tab is not focused --- web/react/stores/channel_store.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web/react/stores/channel_store.jsx') 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); -- cgit v1.2.3-1-g7c22