diff --git a/src/global/actions/apiUpdaters/initial.ts b/src/global/actions/apiUpdaters/initial.ts index 296f64cbd..e0989bd9d 100644 --- a/src/global/actions/apiUpdaters/initial.ts +++ b/src/global/actions/apiUpdaters/initial.ts @@ -111,11 +111,19 @@ function onUpdateAuthorizationState(update: ApiUpdateAuthorizationState) { }); break; case 'authorizationStateWaitPassword': - setGlobal({ + global = { ...global, authHint: update.hint, - hasWebAuthTokenPasswordRequired: update.noReset, - }); + }; + + if (update.noReset) { + global = { + ...global, + hasWebAuthTokenPasswordRequired: true, + }; + } + + setGlobal(global); break; case 'authorizationStateWaitQrCode': setGlobal({ diff --git a/src/global/types.ts b/src/global/types.ts index f34d5815f..9ab41d5bf 100644 --- a/src/global/types.ts +++ b/src/global/types.ts @@ -141,7 +141,7 @@ export type GlobalState = { appConfig?: ApiAppConfig; canInstall?: boolean; hasWebAuthTokenFailed?: boolean; - hasWebAuthTokenPasswordRequired?: boolean; + hasWebAuthTokenPasswordRequired?: true; isChatInfoShown: boolean; isStatisticsShown?: boolean; isLeftColumnShown: boolean;