Fix save prompt showing when disabled by user

This commit is contained in:
Daniel James Smith 2021-12-15 19:04:47 +01:00
parent 77c107cd21
commit 0174d239ca
No known key found for this signature in database
GPG Key ID: 03E4BD365FF06726
1 changed files with 5 additions and 2 deletions

View File

@ -198,7 +198,12 @@ export default class NotificationBackground {
normalizedUsername = normalizedUsername.toLowerCase();
}
const disabledAddLogin = await this.storageService.get<boolean>(ConstantsService.disableAddLoginNotificationKey);
if (await this.vaultTimeoutService.isLocked()) {
if (disabledAddLogin) {
return;
}
if (!await this.allowPersonalOwnership()) {
return;
}
@ -211,8 +216,6 @@ export default class NotificationBackground {
const usernameMatches = ciphers.filter(c =>
c.login.username != null && c.login.username.toLowerCase() === normalizedUsername);
if (usernameMatches.length === 0) {
const disabledAddLogin = await this.storageService.get<boolean>(
ConstantsService.disableAddLoginNotificationKey);
if (disabledAddLogin) {
return;
}