summaryrefslogtreecommitdiffstats
path: root/web/react/stores/channel_store.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/stores/channel_store.jsx')
-rw-r--r--web/react/stores/channel_store.jsx4
1 files changed, 2 insertions, 2 deletions
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);