diff --git a/src/background/runtime.background.ts b/src/background/runtime.background.ts index ca45d1984f..13a3763f32 100644 --- a/src/background/runtime.background.ts +++ b/src/background/runtime.background.ts @@ -280,6 +280,11 @@ export default class RuntimeBackground { const ciphers = await this.cipherService.getAllDecryptedForUrl(loginInfo.url); const usernameMatches = ciphers.filter((c) => c.login.username === loginInfo.username); if (usernameMatches.length === 0) { + const disabledAddLogin = await this.storageService.get( + ConstantsService.disableAddLoginNotificationKey); + if (disabledAddLogin) { + return; + } // remove any old messages for this tab this.removeTabFromNotificationQueue(tab); this.main.notificationQueue.push({ @@ -293,6 +298,11 @@ export default class RuntimeBackground { }); await this.main.checkNotificationQueue(tab); } else if (usernameMatches.length === 1 && usernameMatches[0].login.password !== loginInfo.password) { + const disabledChangePassword = await this.storageService.get( + ConstantsService.disableChangedPasswordNotificationKey); + if (disabledChangePassword) { + return; + } this.addChangedPasswordToQueue(usernameMatches[0].id, loginDomain, loginInfo.password, tab); } } diff --git a/src/content/notificationBar.ts b/src/content/notificationBar.ts index c40243864a..f94cf7f4a5 100644 --- a/src/content/notificationBar.ts +++ b/src/content/notificationBar.ts @@ -326,7 +326,8 @@ document.addEventListener('DOMContentLoaded', (event) => { if (formData[i].formEl !== form) { continue; } - if (!disabledAddLoginNotification && formData[i].usernameEl != null && formData[i].passwordEl != null) { + const disabledBoth = disabledChangedPasswordNotification && disabledAddLoginNotification; + if (!disabledBoth && formData[i].usernameEl != null && formData[i].passwordEl != null) { const login = { username: formData[i].usernameEl.value, password: formData[i].passwordEl.value,