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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user