Make proper async calls when switching channels
Этот коммит содержится в:
@@ -106,10 +106,16 @@ export function getChannel(id) {
|
||||
);
|
||||
}
|
||||
|
||||
export function updateLastViewedAt() {
|
||||
const channelId = ChannelStore.getCurrentId();
|
||||
export function updateLastViewedAt(id) {
|
||||
let channelId;
|
||||
if (id) {
|
||||
channelId = id;
|
||||
} else {
|
||||
channelId = ChannelStore.getCurrentId();
|
||||
}
|
||||
console.log('start ' + channelId);
|
||||
|
||||
if (channelId === null) {
|
||||
if (channelId == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -118,6 +124,7 @@ export function updateLastViewedAt() {
|
||||
}
|
||||
|
||||
callTracker[`updateLastViewed${channelId}`] = utils.getTimestamp();
|
||||
console.log('call ' + channelId);
|
||||
client.updateLastViewedAt(
|
||||
channelId,
|
||||
() => {
|
||||
@@ -159,8 +166,13 @@ export function getMoreChannels(force) {
|
||||
}
|
||||
}
|
||||
|
||||
export function getChannelExtraInfo() {
|
||||
const channelId = ChannelStore.getCurrentId();
|
||||
export function getChannelExtraInfo(id) {
|
||||
let channelId;
|
||||
if (id) {
|
||||
channelId = id;
|
||||
} else {
|
||||
channelId = ChannelStore.getCurrentId();
|
||||
}
|
||||
|
||||
if (channelId != null) {
|
||||
if (isCallInProgress('getChannelExtraInfo_' + channelId)) {
|
||||
|
||||
Ссылка в новой задаче
Block a user