From c820875eb0f8bc19a31866e78c33f3e8ffb4aa47 Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Mon, 22 Apr 2024 17:11:58 +0300 Subject: [PATCH] UI: Improved detect platform language in login --- ui-ngx/src/app/app.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-ngx/src/app/app.component.ts b/ui-ngx/src/app/app.component.ts index bd992cb943..cf53929e54 100644 --- a/ui-ngx/src/app/app.component.ts +++ b/ui-ngx/src/app/app.component.ts @@ -97,9 +97,9 @@ export class AppComponent implements OnInit { map(results => ({isAuthenticated: results[0], isUserLoaded: results[1]})), filter((data) => data.isUserLoaded), distinctUntilChanged((a, b) => isEqual(a, b)), - tap(() => { + tap((data) => { let userLang = getCurrentAuthState(this.store).userDetails?.additionalInfo?.lang ?? null; - if (!userLang) { + if (!userLang && !data.isAuthenticated) { const settings = this.storageService.getItem(SETTINGS_KEY); userLang = settings?.userLang ?? null; }