1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-28 12:45:45 +01:00

[bug] Checkout all vaults before reloading process (#1267)

This commit is contained in:
Addison Beck 2022-01-25 09:36:30 -05:00 committed by GitHub
parent c458b4d8a9
commit 555ee1c230
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -154,8 +154,8 @@ export class AppComponent implements OnInit {
} }
this.notificationsService.updateConnection(); this.notificationsService.updateConnection();
this.updateAppMenu(); this.updateAppMenu();
this.systemService.startProcessReload();
await this.systemService.clearPendingClipboard(); await this.systemService.clearPendingClipboard();
await this.reloadProcess();
break; break;
case "authBlocked": case "authBlocked":
this.router.navigate(["login"]); this.router.navigate(["login"]);
@ -187,8 +187,8 @@ export class AppComponent implements OnInit {
} }
this.notificationsService.updateConnection(); this.notificationsService.updateConnection();
await this.updateAppMenu(); await this.updateAppMenu();
this.systemService.startProcessReload();
await this.systemService.clearPendingClipboard(); await this.systemService.clearPendingClipboard();
await this.reloadProcess();
break; break;
case "reloadProcess": case "reloadProcess":
window.location.reload(true); window.location.reload(true);
@ -571,4 +571,16 @@ export class AppComponent implements OnInit {
}); });
} }
} }
private async reloadProcess(): Promise<void> {
const accounts = Object.keys(this.stateService.accounts.getValue());
if (accounts.length > 0) {
for (const userId in accounts) {
if (!(await this.vaultTimeoutService.isLocked(accounts[userId]))) {
return;
}
}
}
await this.systemService.startProcessReload();
}
} }