PLT-3366 Holding down the ALT key and clicking on a message adds a new messages indicator (squashed) (#3374)

Этот коммит содержится в:
samogot
2016-07-14 15:19:27 +03:00
коммит произвёл Joram Wilander
родитель 6abc9601be
Коммит 9b9facd3d2
14 изменённых файлов: 296 добавлений и 37 удалений

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

@@ -145,6 +145,43 @@ export function updateLastViewedAt(id) {
);
}
export function setLastViewedAt(lastViewedAt, id) {
let channelId;
if (id) {
channelId = id;
} else {
channelId = ChannelStore.getCurrentId();
}
if (channelId == null) {
return;
}
if (lastViewedAt == null) {
return;
}
if (isCallInProgress(`setLastViewedAt${channelId}${lastViewedAt}`)) {
return;
}
callTracker[`setLastViewedAt${channelId}${lastViewedAt}`] = utils.getTimestamp();
Client.setLastViewedAt(
channelId,
lastViewedAt,
() => {
callTracker.setLastViewedAt = 0;
ErrorStore.clearLastError();
},
(err) => {
callTracker.setLastViewedAt = 0;
var count = ErrorStore.getConnectionErrorCount();
ErrorStore.setConnectionErrorCount(count + 1);
dispatchError(err, 'setLastViewedAt');
}
);
}
export function getMoreChannels(force) {
if (isCallInProgress('getMoreChannels')) {
return;