Skip to content

Commit 9fa316f

Browse files
committed
UiLoader: Fix white screen on lock (#7412)
1 parent fcd4ad7 commit 9fa316f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎src/global/reducers/passcode.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ export function clearGlobalForLockScreen<T extends GlobalState>(global: T, withT
2929
passcode: global.passcode,
3030
sharedState: global.sharedState,
3131
...(withTabState && {
32-
byTabId: Object.values(global.byTabId).reduce((acc, { id: tabId, isMasterTab }) => {
33-
acc[tabId] = { ...INITIAL_TAB_STATE, isMasterTab, id: tabId };
32+
// `uiReadyState` is kept, since `UiLoader` reads its reset as an account switch and covers the lock screen
33+
byTabId: Object.values(global.byTabId).reduce((acc, { id: tabId, isMasterTab, uiReadyState }) => {
34+
acc[tabId] = { ...INITIAL_TAB_STATE, isMasterTab, uiReadyState, id: tabId };
3435
return acc;
3536
}, {} as Record<number, TabState>),
3637
}),

0 commit comments

Comments
 (0)