From ff7dd4ad8f42858593bc515aff9cb1a068a0fa50 Mon Sep 17 00:00:00 2001 From: Addison Beck Date: Wed, 26 Jan 2022 09:33:37 -0500 Subject: [PATCH] [bug] Don't monitor vault timeout action valueChanges until after init (#1271) --- src/app/accounts/settings.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/accounts/settings.component.ts b/src/app/accounts/settings.component.ts index ae17c3bdc3..4c553c1275 100644 --- a/src/app/accounts/settings.component.ts +++ b/src/app/accounts/settings.component.ts @@ -122,10 +122,6 @@ export class SettingsComponent implements OnInit { { name: i18nService.t("never"), value: null }, ]); - this.vaultTimeout.valueChanges.pipe(debounceTime(500)).subscribe(() => { - this.saveVaultTimeoutOptions(); - }); - const localeOptions: any[] = []; i18nService.supportedTranslationLocales.forEach((locale) => { let name = locale; @@ -179,6 +175,10 @@ export class SettingsComponent implements OnInit { // Security this.vaultTimeout.setValue(await this.stateService.getVaultTimeout()); this.vaultTimeoutAction = await this.stateService.getVaultTimeoutAction(); + this.vaultTimeout.valueChanges.pipe(debounceTime(500)).subscribe(() => { + this.saveVaultTimeoutOptions(); + }); + const pinSet = await this.vaultTimeoutService.isPinLockSet(); this.pin = pinSet[0] || pinSet[1];