1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-02-16 01:21:48 +01:00

[PM-3330] Force Update to Lockable Accounts on PIN/Biometric Update (#6006)

* Add Listener For Events that Need To Redraw the Menu

* Send redrawMenu Message When Pin/Biometrics Updated
This commit is contained in:
Justin Baur 2023-08-10 13:42:07 -04:00 committed by GitHub
parent 55482c5648
commit 6f84f4ca73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 29 additions and 21 deletions

View File

@ -429,6 +429,7 @@ export class SettingsComponent implements OnInit {
await this.vaultTimeoutSettingsService.clear();
}
this.messagingService.send("redrawMenu");
}
async updateBiometric(enabled: boolean) {
@ -437,6 +438,7 @@ export class SettingsComponent implements OnInit {
// The bug should resolve itself once the angular issue is resolved.
// See: https://github.com/angular/angular/issues/13063
try {
if (!enabled || !this.supportsBiometric) {
this.form.controls.biometric.setValue(false, { emitEvent: false });
await this.stateService.setBiometricUnlock(null);
@ -461,6 +463,9 @@ export class SettingsComponent implements OnInit {
if (!biometricSet) {
await this.stateService.setBiometricUnlock(null);
}
} finally {
this.messagingService.send("redrawMenu");
}
}
async updateAutoPromptBiometrics() {

View File

@ -404,6 +404,9 @@ export class AppComponent implements OnInit, OnDestroy {
await this.openLoginApproval(message.notificationId);
}
break;
case "redrawMenu":
await this.updateAppMenu();
break;
}
});
});