mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
Close login tab before executing existing unlock flow
This commit is contained in:
@@ -54,21 +54,19 @@ export default class RuntimeBackground {
|
|||||||
switch (msg.command) {
|
switch (msg.command) {
|
||||||
case 'loggedIn':
|
case 'loggedIn':
|
||||||
case 'unlocked':
|
case 'unlocked':
|
||||||
|
if (this.lockedVaultPendingNotifications.length > 0) {
|
||||||
|
await BrowserApi.closeLoginTab();
|
||||||
|
|
||||||
|
if (item?.sender?.tab?.id) {
|
||||||
|
await BrowserApi.focusSpecifiedTab(item.sender.tab.id);
|
||||||
|
}
|
||||||
|
await this.processMessage(item.msg, item.sender, null);
|
||||||
|
}
|
||||||
|
|
||||||
await this.main.setIcon();
|
await this.main.setIcon();
|
||||||
await this.main.refreshBadgeAndMenu(false);
|
await this.main.refreshBadgeAndMenu(false);
|
||||||
this.notificationsService.updateConnection(msg.command === 'unlocked');
|
this.notificationsService.updateConnection(msg.command === 'unlocked');
|
||||||
this.systemService.cancelProcessReload();
|
this.systemService.cancelProcessReload();
|
||||||
|
|
||||||
if (this.lockedVaultPendingNotifications.length > 0) {
|
|
||||||
const retryItem = this.lockedVaultPendingNotifications.pop();
|
|
||||||
await this.processMessage(retryItem.msg, retryItem.sender, null);
|
|
||||||
|
|
||||||
await BrowserApi.closeLoginTab();
|
|
||||||
|
|
||||||
if (retryItem?.sender?.tab?.id) {
|
|
||||||
await BrowserApi.focusSpecifiedTab(retryItem.sender.tab.id);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'addToLockedVaultPendingNotifications':
|
case 'addToLockedVaultPendingNotifications':
|
||||||
const retryMessage = {
|
const retryMessage = {
|
||||||
|
|||||||
Reference in New Issue
Block a user