incorporate channel updateAt into channel counts and pull channel data on channel update

Этот коммит содержится в:
JoramWilander
2015-08-11 08:20:17 -04:00
родитель 6c0fefad15
Коммит 4ec76e059c
5 изменённых файлов: 22 добавлений и 11 удалений

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

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