Change refresh on version change to be after explicit click (#7090)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
65817e13c7
Коммит
6ff7e4ea4b
@@ -67,6 +67,7 @@ export function emitChannelClickEvent(channel) {
|
||||
|
||||
// Mark previous and next channel as read
|
||||
ChannelStore.resetCounts([chan.id, oldChannelId]);
|
||||
reloadIfServerVersionChanged();
|
||||
});
|
||||
|
||||
// Subtract mentions for the team
|
||||
@@ -593,3 +594,15 @@ export function emitPopoverMentionKeyClick(isRHS, mentionKey) {
|
||||
mentionKey
|
||||
});
|
||||
}
|
||||
|
||||
let serverVersion = '';
|
||||
|
||||
export function reloadIfServerVersionChanged() {
|
||||
const newServerVersion = Client4.getServerVersion();
|
||||
if (serverVersion && serverVersion !== newServerVersion) {
|
||||
console.log('Detected version update refreshing the page'); //eslint-disable-line no-console
|
||||
window.location.reload(true);
|
||||
}
|
||||
|
||||
serverVersion = newServerVersion;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user