mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 01:33:33 +00:00
Use messages/events instead of main.unlockCompleted
This commit is contained in:
@@ -129,16 +129,15 @@ export default class MainBackground {
|
||||
onUpdatedRan: boolean;
|
||||
onReplacedRan: boolean;
|
||||
loginToAutoFill: CipherView = null;
|
||||
lockedVaultPendingNotifications: { commandToRetry: any, from: string }[] = [];
|
||||
|
||||
private commandsBackground: CommandsBackground;
|
||||
private contextMenusBackground: ContextMenusBackground;
|
||||
private idleBackground: IdleBackground;
|
||||
private notificationBackground: NotificationBackground;
|
||||
private runtimeBackground: RuntimeBackground;
|
||||
private tabsBackground: TabsBackground;
|
||||
private webRequestBackground: WebRequestBackground;
|
||||
private windowsBackground: WindowsBackground;
|
||||
private notificationBackground: NotificationBackground;
|
||||
|
||||
private sidebarAction: any;
|
||||
private buildingContextMenu: boolean;
|
||||
@@ -344,21 +343,6 @@ export default class MainBackground {
|
||||
}
|
||||
}
|
||||
|
||||
async unlockCompleted() {
|
||||
if (this.lockedVaultPendingNotifications.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const item = this.lockedVaultPendingNotifications.pop();
|
||||
switch (item.from) {
|
||||
case 'notificationBar':
|
||||
await this.notificationBackground.processMessage(item.commandToRetry, item.commandToRetry.sender, null);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
async logout(expired: boolean) {
|
||||
await this.eventService.uploadEvents();
|
||||
const userId = await this.userService.getUserId();
|
||||
|
||||
Reference in New Issue
Block a user