diff options
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/async_client.jsx | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx index 8cf111d55..5df43b548 100644 --- a/web/react/utils/async_client.jsx +++ b/web/react/utils/async_client.jsx @@ -106,10 +106,15 @@ 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(); + } - if (channelId === null) { + if (channelId == null) { return; } @@ -159,8 +164,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)) { |