Fix badge and tab */(1) not disappearing until switching away from channel

Этот коммит содержится в:
JoramWilander
2016-02-12 14:23:12 -05:00
родитель 6cb4f82ee5
Коммит c861a24d48
3 изменённых файлов: 8 добавлений и 6 удалений

Просмотреть файл

@@ -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);