fix: change use-set priority (#2760)

The user settings(locale, appearance) are not in use when restart broswer
pull/2757/head^2
THELOSTSOUL 1 year ago committed by GitHub
parent a22ad90174
commit cd3a98c095
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -45,8 +45,8 @@ export const initialGlobalState = async () => {
},
};
defaultGlobalState.locale =
defaultGlobalState.locale || defaultGlobalState.systemStatus.customizedProfile.locale || findNearestLanguageMatch(i18n.language);
defaultGlobalState.appearance = defaultGlobalState.appearance || defaultGlobalState.systemStatus.customizedProfile.appearance;
defaultGlobalState.systemStatus.customizedProfile.locale || defaultGlobalState.locale || findNearestLanguageMatch(i18n.language);
defaultGlobalState.appearance = defaultGlobalState.systemStatus.customizedProfile.appearance || defaultGlobalState.appearance;
}
store.dispatch(setGlobalState(defaultGlobalState));
};

Loading…
Cancel
Save