1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-07 21:23:00 +03:00

Clear local storage settings handler cache on logout (#8454)

This commit is contained in:
Michael Telatynski
2022-05-02 03:23:43 +01:00
committed by GitHub
parent 3a245a0cbe
commit 633229ca26
2 changed files with 36 additions and 22 deletions

View File

@@ -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");