mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-01 18:08:19 +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;
|
||||
loginToAutoFill: any = null;
|
||||
notificationQueue: any[] = [];
|
||||
retryQueue: any[] = [];
|
||||
|
||||
private commandsBackground: CommandsBackground;
|
||||
private contextMenusBackground: ContextMenusBackground;
|
||||
|
@ -37,6 +37,8 @@ export default class RuntimeBackground {
|
||||
private pageDetailsToAutoFill: any[] = [];
|
||||
private onInstalledReason: string = null;
|
||||
|
||||
private lockedVaultPendingNotifications: any[] = [];
|
||||
|
||||
constructor(private main: MainBackground, private autofillService: AutofillService,
|
||||
private cipherService: CipherService, private platformUtilsService: BrowserPlatformUtilsService,
|
||||
private storageService: StorageService, private i18nService: I18nService,
|
||||
@ -72,8 +74,8 @@ export default class RuntimeBackground {
|
||||
this.notificationsService.updateConnection(msg.command === 'unlocked');
|
||||
this.systemService.cancelProcessReload();
|
||||
|
||||
if (this.main.retryQueue.length > 0) {
|
||||
const retryItem = this.main.retryQueue.pop();
|
||||
if (this.lockedVaultPendingNotifications.length > 0) {
|
||||
const retryItem = this.lockedVaultPendingNotifications.pop();
|
||||
await this.processMessage(retryItem.msg, retryItem.sender, null);
|
||||
}
|
||||
break;
|
||||
@ -82,7 +84,7 @@ export default class RuntimeBackground {
|
||||
msg: msg.retryItem,
|
||||
sender: sender,
|
||||
};
|
||||
this.main.retryQueue.push(retryMessage);
|
||||
this.lockedVaultPendingNotifications.push(retryMessage);
|
||||
break;
|
||||
case 'logout':
|
||||
await this.main.logout(msg.expired);
|
||||
|
Loading…
Reference in New Issue
Block a user