[bug] Don't monitor vault timeout action valueChanges until after init (#1271)

This commit is contained in:
Addison Beck 2022-01-26 09:33:37 -05:00 committed by GitHub
parent 9271ec37b9
commit ff7dd4ad8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -122,10 +122,6 @@ export class SettingsComponent implements OnInit {
{ name: i18nService.t("never"), value: null }, { name: i18nService.t("never"), value: null },
]); ]);
this.vaultTimeout.valueChanges.pipe(debounceTime(500)).subscribe(() => {
this.saveVaultTimeoutOptions();
});
const localeOptions: any[] = []; const localeOptions: any[] = [];
i18nService.supportedTranslationLocales.forEach((locale) => { i18nService.supportedTranslationLocales.forEach((locale) => {
let name = locale; let name = locale;
@ -179,6 +175,10 @@ export class SettingsComponent implements OnInit {
// Security // Security
this.vaultTimeout.setValue(await this.stateService.getVaultTimeout()); this.vaultTimeout.setValue(await this.stateService.getVaultTimeout());
this.vaultTimeoutAction = await this.stateService.getVaultTimeoutAction(); this.vaultTimeoutAction = await this.stateService.getVaultTimeoutAction();
this.vaultTimeout.valueChanges.pipe(debounceTime(500)).subscribe(() => {
this.saveVaultTimeoutOptions();
});
const pinSet = await this.vaultTimeoutService.isPinLockSet(); const pinSet = await this.vaultTimeoutService.isPinLockSet();
this.pin = pinSet[0] || pinSet[1]; this.pin = pinSet[0] || pinSet[1];