Merge branch 'master' of https://github.com/mattermost/platform into ui-improvements
Этот коммит содержится в:
@@ -74,9 +74,9 @@ class BrowserStoreClass {
|
|||||||
var result = null;
|
var result = null;
|
||||||
try {
|
try {
|
||||||
if (this.isLocalStorageSupported()) {
|
if (this.isLocalStorageSupported()) {
|
||||||
result = JSON.parse(getPrefix() + localStorage.getItem(name));
|
result = JSON.parse(localStorage.getItem(getPrefix() + name));
|
||||||
} else {
|
} else {
|
||||||
result = JSON.parse(getPrefix() + sessionStorage.getItem(name));
|
result = JSON.parse(sessionStorage.getItem(getPrefix() + name));
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
result = null;
|
result = null;
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ function handleNewPostEvent(msg) {
|
|||||||
// Update channel state
|
// Update channel state
|
||||||
if (ChannelStore.getCurrentId() === msg.channel_id) {
|
if (ChannelStore.getCurrentId() === msg.channel_id) {
|
||||||
if (window.isActive) {
|
if (window.isActive) {
|
||||||
AsyncClient.updateLastViewedAt();
|
AsyncClient.updateLastViewedAt(true);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
AsyncClient.getChannel(msg.channel_id);
|
AsyncClient.getChannel(msg.channel_id);
|
||||||
|
|||||||
@@ -152,14 +152,14 @@ export function getChannel(id) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateLastViewedAt() {
|
export function updateLastViewedAt(force) {
|
||||||
const channelId = ChannelStore.getCurrentId();
|
const channelId = ChannelStore.getCurrentId();
|
||||||
|
|
||||||
if (channelId === null) {
|
if (channelId === null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isCallInProgress(`updateLastViewed${channelId}`)) {
|
if (isCallInProgress(`updateLastViewed${channelId}`) && !force) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user