mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-20 21:01:29 +01:00
Move retryQueue from main to runtime and rename it to lockedVaultPendingNotifications
This commit is contained in:
parent
2613a8cfea
commit
75c8c4205f
@ -127,7 +127,6 @@ export default class MainBackground {
|
|||||||
onReplacedRan: boolean;
|
onReplacedRan: boolean;
|
||||||
loginToAutoFill: any = null;
|
loginToAutoFill: any = null;
|
||||||
notificationQueue: any[] = [];
|
notificationQueue: any[] = [];
|
||||||
retryQueue: any[] = [];
|
|
||||||
|
|
||||||
private commandsBackground: CommandsBackground;
|
private commandsBackground: CommandsBackground;
|
||||||
private contextMenusBackground: ContextMenusBackground;
|
private contextMenusBackground: ContextMenusBackground;
|
||||||
|
@ -37,6 +37,8 @@ export default class RuntimeBackground {
|
|||||||
private pageDetailsToAutoFill: any[] = [];
|
private pageDetailsToAutoFill: any[] = [];
|
||||||
private onInstalledReason: string = null;
|
private onInstalledReason: string = null;
|
||||||
|
|
||||||
|
private lockedVaultPendingNotifications: any[] = [];
|
||||||
|
|
||||||
constructor(private main: MainBackground, private autofillService: AutofillService,
|
constructor(private main: MainBackground, private autofillService: AutofillService,
|
||||||
private cipherService: CipherService, private platformUtilsService: BrowserPlatformUtilsService,
|
private cipherService: CipherService, private platformUtilsService: BrowserPlatformUtilsService,
|
||||||
private storageService: StorageService, private i18nService: I18nService,
|
private storageService: StorageService, private i18nService: I18nService,
|
||||||
@ -72,8 +74,8 @@ export default class RuntimeBackground {
|
|||||||
this.notificationsService.updateConnection(msg.command === 'unlocked');
|
this.notificationsService.updateConnection(msg.command === 'unlocked');
|
||||||
this.systemService.cancelProcessReload();
|
this.systemService.cancelProcessReload();
|
||||||
|
|
||||||
if (this.main.retryQueue.length > 0) {
|
if (this.lockedVaultPendingNotifications.length > 0) {
|
||||||
const retryItem = this.main.retryQueue.pop();
|
const retryItem = this.lockedVaultPendingNotifications.pop();
|
||||||
await this.processMessage(retryItem.msg, retryItem.sender, null);
|
await this.processMessage(retryItem.msg, retryItem.sender, null);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -82,7 +84,7 @@ export default class RuntimeBackground {
|
|||||||
msg: msg.retryItem,
|
msg: msg.retryItem,
|
||||||
sender: sender,
|
sender: sender,
|
||||||
};
|
};
|
||||||
this.main.retryQueue.push(retryMessage);
|
this.lockedVaultPendingNotifications.push(retryMessage);
|
||||||
break;
|
break;
|
||||||
case 'logout':
|
case 'logout':
|
||||||
await this.main.logout(msg.expired);
|
await this.main.logout(msg.expired);
|
||||||
|
Loading…
Reference in New Issue
Block a user