aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/stores/AppStore.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/stores/AppStore.ts b/src/stores/AppStore.ts
index 08d2f718c..aab279e59 100644
--- a/src/stores/AppStore.ts
+++ b/src/stores/AppStore.ts
@@ -503,11 +503,15 @@ export default class AppStore extends TypedStore {
503 this.isClearingAllCache = false; 503 this.isClearingAllCache = false;
504 } 504 }
505 505
506 @action _setLocale() { 506 @action _changeLocale(value: string) {
507 this.locale = value;
508 }
509
510 _setLocale() {
507 if (this.stores.user?.isLoggedIn && this.stores.user?.data.locale) { 511 if (this.stores.user?.isLoggedIn && this.stores.user?.data.locale) {
508 this.locale = this.stores.user.data.locale; 512 this._changeLocale(this.stores.user.data.locale);
509 } else if (!this.locale) { 513 } else if (!this.locale) {
510 this.locale = this._getDefaultLocale(); 514 this._changeLocale(this._getDefaultLocale());
511 } 515 }
512 516
513 moment.locale(this.locale); 517 moment.locale(this.locale);