PLT-5396 Fix team mention badge persistance (#5543)

Этот коммит содержится в:
enahum
2017-02-27 16:26:38 -03:00
коммит произвёл Corey Hulen
родитель b5ffdf5c54
Коммит 4429e2f58c
2 изменённых файлов: 12 добавлений и 0 удалений

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

@@ -55,6 +55,10 @@ export function emitChannelClickEvent(channel) {
loadPosts(chan.id);
});
// Subtract mentions for the team
const {msgs, mentions} = ChannelStore.getUnreadCounts()[chan.id] || {msgs: 0, mentions: 0};
TeamStore.subtractUnread(chan.team_id, msgs, mentions);
// Mark previous and next channel as read
ChannelStore.resetCounts(oldChannelId);
ChannelStore.resetCounts(chan.id);