1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

[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

View File

@@ -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];