From 0174d239ca2d3d6002f1a178f7ad561e9b7a97c6 Mon Sep 17 00:00:00 2001 From: Daniel James Smith Date: Wed, 15 Dec 2021 19:04:47 +0100 Subject: [PATCH] Fix save prompt showing when disabled by user --- src/background/notification.background.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/background/notification.background.ts b/src/background/notification.background.ts index 6a5ac80d34..d7f319fb57 100644 --- a/src/background/notification.background.ts +++ b/src/background/notification.background.ts @@ -198,7 +198,12 @@ export default class NotificationBackground { normalizedUsername = normalizedUsername.toLowerCase(); } + const disabledAddLogin = await this.storageService.get(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( - ConstantsService.disableAddLoginNotificationKey); if (disabledAddLogin) { return; }