fix: change use-set priority (#2760)

The user settings(locale, appearance) are not in use when restart broswer
This commit is contained in:
THELOSTSOUL 2024-01-15 20:08:14 +08:00 committed by GitHub
parent a22ad90174
commit cd3a98c095
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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