Fix global state saving to local storage on login (#3168)
This commit is contained in:
parent
1ada3f8c30
commit
379c5121aa
@ -14,7 +14,7 @@ import { startWebsync, stopWebsync } from '../../../util/websync';
|
|||||||
import { subscribe, unsubscribe } from '../../../util/notifications';
|
import { subscribe, unsubscribe } from '../../../util/notifications';
|
||||||
import { clearCaching, setupCaching } from '../../cache';
|
import { clearCaching, setupCaching } from '../../cache';
|
||||||
import { decryptSessionByCurrentHash } from '../../../util/passcode';
|
import { decryptSessionByCurrentHash } from '../../../util/passcode';
|
||||||
import { storeSession } from '../../../util/sessions';
|
import { hasStoredSession, storeSession } from '../../../util/sessions';
|
||||||
import { callApi } from '../../../api/gramjs';
|
import { callApi } from '../../../api/gramjs';
|
||||||
import type { ActionReturnType, GlobalState } from '../../types';
|
import type { ActionReturnType, GlobalState } from '../../types';
|
||||||
import { updateTabState } from '../../reducers/tabs';
|
import { updateTabState } from '../../reducers/tabs';
|
||||||
@ -51,7 +51,9 @@ addActionHandler('switchMultitabRole', async (global, actions, payload): Promise
|
|||||||
storeSession(session, session.userId);
|
storeSession(session, session.userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
setupCaching();
|
if (hasStoredSession(true)) {
|
||||||
|
setupCaching();
|
||||||
|
}
|
||||||
|
|
||||||
global = getGlobal();
|
global = getGlobal();
|
||||||
if (!global.passcode.hasPasscode || !global.passcode.isScreenLocked) {
|
if (!global.passcode.hasPasscode || !global.passcode.isScreenLocked) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user