Clear local storage settings handler cache on logout (#8454)
This commit is contained in:
parent
3a245a0cbe
commit
633229ca26
2 changed files with 36 additions and 22 deletions
|
@ -61,6 +61,7 @@ import { setSentryUser } from "./sentry";
|
|||
import SdkConfig from "./SdkConfig";
|
||||
import { DialogOpener } from "./utils/DialogOpener";
|
||||
import { Action } from "./dispatcher/actions";
|
||||
import AbstractLocalStorageSettingsHandler from "./settings/handlers/AbstractLocalStorageSettingsHandler";
|
||||
|
||||
const HOMESERVER_URL_KEY = "mx_hs_url";
|
||||
const ID_SERVER_URL_KEY = "mx_is_url";
|
||||
|
@ -878,6 +879,7 @@ async function clearStorage(opts?: { deleteEverything?: boolean }): Promise<void
|
|||
const registrationTime = window.localStorage.getItem("mx_registration_time");
|
||||
|
||||
window.localStorage.clear();
|
||||
AbstractLocalStorageSettingsHandler.clear();
|
||||
|
||||
try {
|
||||
await StorageManager.idbDelete("account", "mx_access_token");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue