Clear settings store cache on logout (#12786)

And clear it in the widget layout store test, also fixing the tests
which didn't actually individually as they actually relied on the state
bleeding between tests.
This commit is contained in:
David Baker 2024-07-17 10:58:07 +01:00 committed by GitHub
parent cf96a6d82c
commit c57d8463b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 31 additions and 13 deletions

View file

@ -1056,6 +1056,7 @@ export async function onLoggedOut(): Promise<void> {
await clearStorage({ deleteEverything: true });
LifecycleCustomisations.onLoggedOutAndStorageCleared?.();
await PlatformPeg.get()?.clearStorage();
SettingsStore.reset();
// Do this last, so we can make sure all storage has been cleared and all
// customisations got the memo.