Force updating last viewed at for new posts
Этот коммит содержится в:
@@ -158,7 +158,7 @@ function handleNewPostEvent(msg) {
|
||||
// Update channel state
|
||||
if (ChannelStore.getCurrentId() === msg.channel_id) {
|
||||
if (window.isActive) {
|
||||
AsyncClient.updateLastViewedAt();
|
||||
AsyncClient.updateLastViewedAt(true);
|
||||
}
|
||||
} else {
|
||||
AsyncClient.getChannel(msg.channel_id);
|
||||
|
||||
@@ -152,14 +152,14 @@ export function getChannel(id) {
|
||||
);
|
||||
}
|
||||
|
||||
export function updateLastViewedAt() {
|
||||
export function updateLastViewedAt(force) {
|
||||
const channelId = ChannelStore.getCurrentId();
|
||||
|
||||
if (channelId === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (isCallInProgress(`updateLastViewed${channelId}`)) {
|
||||
if (isCallInProgress(`updateLastViewed${channelId}`) && !force) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user