summaryrefslogtreecommitdiffstats
path: root/web/react/utils/async_client.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'web/react/utils/async_client.jsx')
-rw-r--r--web/react/utils/async_client.jsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx
index 545c85fc2..7e8a6116c 100644
--- a/web/react/utils/async_client.jsx
+++ b/web/react/utils/async_client.jsx
@@ -99,11 +99,13 @@ function getChannels(force, updateLastViewed, checkVersion) {
}
var countMap = data.counts;
+ var updateAtMap = data.update_times;
for (var id in countMap) {
- var chan = ChannelStore.get(id);
+ var c = ChannelStore.get(id);
var count = countMap[id];
- if (!chan || chan.total_msg_count !== count) {
+ var updateAt = updateAtMap[id];
+ if (!c || c.total_msg_count !== count || updateAt > c.update_at) {
getChannel(id);
}
}