This repository was archived by the owner on Sep 11, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,6 @@ import { setSentryUser } from "./sentry";
5858import SdkConfig from "./SdkConfig" ;
5959import { DialogOpener } from "./utils/DialogOpener" ;
6060import { Action } from "./dispatcher/actions" ;
61- import AbstractLocalStorageSettingsHandler from "./settings/handlers/AbstractLocalStorageSettingsHandler" ;
6261import { OverwriteLoginPayload } from "./dispatcher/payloads/OverwriteLoginPayload" ;
6362import { SdkContextClass } from "./contexts/SDKContext" ;
6463import { messageForLoginError } from "./utils/ErrorUtils" ;
@@ -1087,7 +1086,6 @@ async function clearStorage(opts?: { deleteEverything?: boolean }): Promise<void
10871086 const registrationTime = window . localStorage . getItem ( "mx_registration_time" ) ;
10881087
10891088 window . localStorage . clear ( ) ;
1090- AbstractLocalStorageSettingsHandler . clear ( ) ;
10911089
10921090 try {
10931091 await StorageAccess . idbDelete ( "account" , ACCESS_TOKEN_STORAGE_KEY ) ;
Original file line number Diff line number Diff line change @@ -35,8 +35,7 @@ export default abstract class AbstractLocalStorageSettingsHandler extends Settin
3535 }
3636 } ;
3737
38- // Expose the clear event for Lifecycle to call, the storage listener only fires for changes from other tabs
39- public static clear ( ) : void {
38+ private static clear ( ) : void {
4039 AbstractLocalStorageSettingsHandler . itemCache . clear ( ) ;
4140 AbstractLocalStorageSettingsHandler . objectCache . clear ( ) ;
4241 }
@@ -108,4 +107,8 @@ export default abstract class AbstractLocalStorageSettingsHandler extends Settin
108107 public isSupported ( ) : boolean {
109108 return localStorage !== undefined && localStorage !== null ;
110109 }
110+
111+ public reset ( ) : void {
112+ AbstractLocalStorageSettingsHandler . clear ( ) ;
113+ }
111114}
You can’t perform that action at this time.
0 commit comments