defer badge and menu state updates (#9223)

This commit is contained in:
Jonathan Prusik 2024-05-17 15:00:37 -04:00 committed by Robyn MacCallum
parent 89ea90ce51
commit e8ed4f38f4
1 changed files with 7 additions and 2 deletions

View File

@ -196,8 +196,6 @@ export default class RuntimeBackground {
}
await this.notificationsService.updateConnection(msg.command === "loggedIn");
await this.main.refreshBadge();
await this.main.refreshMenu(false);
this.systemService.cancelProcessReload();
if (item) {
@ -209,6 +207,13 @@ export default class RuntimeBackground {
item,
);
}
// @TODO these need to happen last to avoid blocking `tabSendMessageData` above
// The underlying cause exists within `cipherService.getAllDecrypted` via
// `getAllDecryptedForUrl` and is anticipated to be refactored
await this.main.refreshBadge();
await this.main.refreshMenu(false);
break;
}
case "addToLockedVaultPendingNotifications":