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";
58
58
import SdkConfig from "./SdkConfig" ;
59
59
import { DialogOpener } from "./utils/DialogOpener" ;
60
60
import { Action } from "./dispatcher/actions" ;
61
- import AbstractLocalStorageSettingsHandler from "./settings/handlers/AbstractLocalStorageSettingsHandler" ;
62
61
import { OverwriteLoginPayload } from "./dispatcher/payloads/OverwriteLoginPayload" ;
63
62
import { SdkContextClass } from "./contexts/SDKContext" ;
64
63
import { messageForLoginError } from "./utils/ErrorUtils" ;
@@ -1087,7 +1086,6 @@ async function clearStorage(opts?: { deleteEverything?: boolean }): Promise<void
1087
1086
const registrationTime = window . localStorage . getItem ( "mx_registration_time" ) ;
1088
1087
1089
1088
window . localStorage . clear ( ) ;
1090
- AbstractLocalStorageSettingsHandler . clear ( ) ;
1091
1089
1092
1090
try {
1093
1091
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
35
35
}
36
36
} ;
37
37
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 {
40
39
AbstractLocalStorageSettingsHandler . itemCache . clear ( ) ;
41
40
AbstractLocalStorageSettingsHandler . objectCache . clear ( ) ;
42
41
}
@@ -108,4 +107,8 @@ export default abstract class AbstractLocalStorageSettingsHandler extends Settin
108
107
public isSupported ( ) : boolean {
109
108
return localStorage !== undefined && localStorage !== null ;
110
109
}
110
+
111
+ public reset ( ) : void {
112
+ AbstractLocalStorageSettingsHandler . clear ( ) ;
113
+ }
111
114
}
You can’t perform that action at this time.
0 commit comments