1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 01:33:33 +00:00

Move notificationQueue from main into notification.background

This commit is contained in:
Daniel James Smith
2021-10-15 15:09:13 +02:00
parent 0eb7fe1407
commit 7388cd174e
3 changed files with 29 additions and 86 deletions

View File

@@ -1,9 +1,10 @@
import MainBackground from './main.background';
import NotificationBackground from './notification.background';
export default class TabsBackground {
private tabs: any;
constructor(private main: MainBackground) {
constructor(private main: MainBackground, private notificationBackground: NotificationBackground) {
this.tabs = chrome.tabs;
}
@@ -23,7 +24,7 @@ export default class TabsBackground {
return;
}
this.main.onReplacedRan = true;
await this.main.checkNotificationQueue();
await this.notificationBackground.checkNotificationQueue();
await this.main.refreshBadgeAndMenu();
this.main.messagingService.send('tabReplaced');
this.main.messagingService.send('tabChanged');
@@ -34,7 +35,7 @@ export default class TabsBackground {
return;
}
this.main.onUpdatedRan = true;
await this.main.checkNotificationQueue();
await this.notificationBackground.checkNotificationQueue();
await this.main.refreshBadgeAndMenu();
this.main.messagingService.send('tabUpdated');
this.main.messagingService.send('tabChanged');