Skip to content

Commit 8af45b0

Browse files
feat: do not use external settings (#725)
1 parent f73dbc8 commit 8af45b0

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/services/settings.ts

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ import {parseJson} from '../utils/utils';
2020

2121
export type SettingsObject = Record<string, unknown>;
2222

23-
const USE_LOCAL_STORAGE_FOR_SETTINGS_KEY = 'useLocalStorageForSettings';
24-
2523
/** User settings keys and their default values */
2624
export const DEFAULT_USER_SETTINGS: SettingsObject = {
2725
[THEME_KEY]: 'system',
@@ -40,25 +38,6 @@ export const DEFAULT_USER_SETTINGS: SettingsObject = {
4038
};
4139

4240
class SettingsManager {
43-
constructor() {
44-
// Migrate settings to LS if external API was used before
45-
const settingsApi = window.web_version ? window.systemSettings?.settingsApi : undefined;
46-
47-
const useLocalStorage = this.readUserSettingsValue(USE_LOCAL_STORAGE_FOR_SETTINGS_KEY);
48-
49-
if (settingsApi && !useLocalStorage) {
50-
const externalUserSettings = window.userSettings;
51-
52-
if (externalUserSettings) {
53-
Object.entries(externalUserSettings).forEach(([key, value]) =>
54-
this.setUserSettingsValue(key, value),
55-
);
56-
}
57-
58-
this.setUserSettingsValue(USE_LOCAL_STORAGE_FOR_SETTINGS_KEY, true);
59-
}
60-
}
61-
6241
/**
6342
* Returns parsed settings value.
6443
* If value cannot be parsed, returns initially stored string.

0 commit comments

Comments
 (0)