From cd3a98c0956cebc640310988468ce6c5cb588286 Mon Sep 17 00:00:00 2001 From: THELOSTSOUL <1095533751@qq.com> Date: Mon, 15 Jan 2024 20:08:14 +0800 Subject: [PATCH] fix: change use-set priority (#2760) The user settings(locale, appearance) are not in use when restart broswer --- web/src/store/module/global.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/src/store/module/global.ts b/web/src/store/module/global.ts index 680134ea8..efd5a41ca 100644 --- a/web/src/store/module/global.ts +++ b/web/src/store/module/global.ts @@ -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)); };