mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-27 04:45:08 +01:00
Clear websync setting before switching to another web version
This commit is contained in:
parent
b393b3cad1
commit
d3dbeffb87
@ -14,6 +14,7 @@ import buildClassName from '../../../util/buildClassName';
|
||||
import { formatDateToString } from '../../../util/dateFormat';
|
||||
import switchTheme from '../../../util/switchTheme';
|
||||
import { setPermanentWebVersion } from '../../../util/permanentWebVersion';
|
||||
import { clearWebsync } from '../../../util/websync';
|
||||
import { selectTheme } from '../../../modules/selectors';
|
||||
import { isChatArchived } from '../../../modules/helpers';
|
||||
import useLang from '../../../hooks/useLang';
|
||||
@ -159,6 +160,7 @@ const LeftMainHeader: FC<OwnProps & StateProps> = ({
|
||||
|
||||
const handleSwitchToWebK = () => {
|
||||
setPermanentWebVersion('K');
|
||||
clearWebsync();
|
||||
disableHistoryBack();
|
||||
};
|
||||
|
||||
|
@ -84,3 +84,7 @@ export function startWebsync() {
|
||||
forceWebsync(authed);
|
||||
}, Math.max(0, timeout * 1000));
|
||||
}
|
||||
|
||||
export function clearWebsync() {
|
||||
localStorage.removeItem(WEBSYNC_KEY);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user