File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change @@ -20,8 +20,6 @@ import {parseJson} from '../utils/utils';
2020
2121export type SettingsObject = Record < string , unknown > ;
2222
23- const USE_LOCAL_STORAGE_FOR_SETTINGS_KEY = 'useLocalStorageForSettings' ;
24-
2523/** User settings keys and their default values */
2624export const DEFAULT_USER_SETTINGS : SettingsObject = {
2725 [ THEME_KEY ] : 'system' ,
@@ -40,25 +38,6 @@ export const DEFAULT_USER_SETTINGS: SettingsObject = {
4038} ;
4139
4240class 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.
You can’t perform that action at this time.
0 commit comments