From c861a24d48d2cb5417f704eca7d28db7637275f6 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Fri, 12 Feb 2016 14:23:12 -0500 Subject: Fix badge and tab */(1) not disappearing until switching away from channel --- 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 ac800a988..60cb10de7 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 && !document.hidden) { + if (currentId && window.isActive) { ChannelStore.resetCounts(currentId); } ChannelStore.setUnreadCounts(); @@ -321,7 +321,7 @@ ChannelStore.dispatchToken = AppDispatcher.register((payload) => { ChannelStore.pStoreChannelMember(action.member); } currentId = ChannelStore.getCurrentId(); - if (currentId && !document.hidden) { + if (currentId && window.isActive) { ChannelStore.resetCounts(currentId); } ChannelStore.setUnreadCount(action.channel.id); -- cgit v1.2.3-1-g7c22