diff --git a/src/background/main.background.ts b/src/background/main.background.ts index 8ffb32123f..492a07be6b 100644 --- a/src/background/main.background.ts +++ b/src/background/main.background.ts @@ -532,22 +532,23 @@ export default class MainBackground { }); } + const disableBadgeCounter = await this.storageService.get(ConstantsService.disableBadgeCounterKey); let theText = ''; - if (ciphers.length > 0 && ciphers.length <= 9) { - theText = ciphers.length.toString(); - } else if (ciphers.length > 0) { - theText = '9+'; - } else { - if (contextMenuEnabled) { - await this.loadNoLoginsContextMenuOptions(this.i18nService.t('noMatchingLogins')); + + if (!disableBadgeCounter) { + if (ciphers.length > 0 && ciphers.length <= 9) { + theText = ciphers.length.toString(); + } else if (ciphers.length > 0) { + theText = '9+'; + } else { + if (contextMenuEnabled) { + await this.loadNoLoginsContextMenuOptions(this.i18nService.t('noMatchingLogins')); + } } } - const disableBadgeCounter = await this.storageService.get(ConstantsService.disableBadgeCounterKey); - if (!disableBadgeCounter) { - this.sidebarActionSetBadgeText(theText, tabId); - this.browserActionSetBadgeText(theText, tabId); - } + this.sidebarActionSetBadgeText(theText, tabId); + this.browserActionSetBadgeText(theText, tabId); return; } catch { } diff --git a/src/popup/settings/options.component.ts b/src/popup/settings/options.component.ts index d850e094f2..dc2bea76ba 100644 --- a/src/popup/settings/options.component.ts +++ b/src/popup/settings/options.component.ts @@ -135,6 +135,7 @@ export class OptionsComponent implements OnInit { async updateDisableBadgeCounter() { await this.storageService.save(ConstantsService.disableBadgeCounterKey, this.disableBadgeCounter); await this.stateService.save(ConstantsService.disableBadgeCounterKey, this.disableBadgeCounter); + this.messagingService.send('bgUpdateContextMenu'); } async updateShowCards() {