diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-02-13 10:30:37 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-02-13 10:30:37 -0500 |
commit | 4721e5cd2b4016041ad5ae4b9e1d833e8575acc9 (patch) | |
tree | 84107b24cb5027d0354a1f69f38ed15c0855a846 /web/react/stores/socket_store.jsx | |
parent | 902ee885701bacda2d45e3f09a98f0d16f840a84 (diff) | |
parent | c861a24d48d2cb5417f704eca7d28db7637275f6 (diff) | |
download | chat-4721e5cd2b4016041ad5ae4b9e1d833e8575acc9.tar.gz chat-4721e5cd2b4016041ad5ae4b9e1d833e8575acc9.tar.bz2 chat-4721e5cd2b4016041ad5ae4b9e1d833e8575acc9.zip |
Merge pull request #2164 from mattermost/unread-tab-fix
RC3 Fix badge and tab */(1) not disappearing until switching away from channel
Diffstat (limited to 'web/react/stores/socket_store.jsx')
-rw-r--r-- | web/react/stores/socket_store.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx index 424c7fe57..efb57e226 100644 --- a/web/react/stores/socket_store.jsx +++ b/web/react/stores/socket_store.jsx @@ -202,10 +202,10 @@ function handleNewPostEvent(msg, translations) { // Update channel state if (ChannelStore.getCurrentId() === msg.channel_id) { - if (document.hidden) { - AsyncClient.getChannel(msg.channel_id); - } else { + if (window.isActive) { AsyncClient.updateLastViewedAt(); + } else { + AsyncClient.getChannel(msg.channel_id); } } else if (UserStore.getCurrentId() !== msg.user_id || post.type !== Constants.POST_TYPE_JOIN_LEAVE) { AsyncClient.getChannel(msg.channel_id); |