[bug] Dont block redirecting on logout
This commit is contained in:
parent
0a44bf4dd9
commit
55850e6cc6
|
@ -556,10 +556,6 @@ export default class MainBackground {
|
||||||
}
|
}
|
||||||
|
|
||||||
async logout(expired: boolean, userId?: string) {
|
async logout(expired: boolean, userId?: string) {
|
||||||
if (!userId) {
|
|
||||||
userId = await this.stateService.getUserId();
|
|
||||||
}
|
|
||||||
|
|
||||||
await this.eventService.uploadEvents(userId);
|
await this.eventService.uploadEvents(userId);
|
||||||
|
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
@ -577,7 +573,7 @@ export default class MainBackground {
|
||||||
this.keyConnectorService.clear(),
|
this.keyConnectorService.clear(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
await this.stateService.clean();
|
await this.stateService.clean({ userId: userId });
|
||||||
|
|
||||||
if (userId == null || userId === (await this.stateService.getUserId())) {
|
if (userId == null || userId === (await this.stateService.getUserId())) {
|
||||||
this.searchService.clearIndex();
|
this.searchService.clearIndex();
|
||||||
|
@ -996,13 +992,14 @@ export default class MainBackground {
|
||||||
}
|
}
|
||||||
|
|
||||||
private async reloadProcess(): Promise<void> {
|
private async reloadProcess(): Promise<void> {
|
||||||
const accounts = Object.keys(this.stateService.accounts.getValue());
|
const accounts = this.stateService.accounts.getValue();
|
||||||
for (const userId of accounts) {
|
if (accounts != null) {
|
||||||
if (!(await this.vaultTimeoutService.isLocked(userId))) {
|
for (const userId of Object.keys(accounts)) {
|
||||||
return;
|
if (!(await this.vaultTimeoutService.isLocked(userId))) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.systemService.startProcessReload();
|
await this.systemService.startProcessReload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,8 +75,6 @@ export class AppComponent implements OnInit {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.stateService.clean({ userId: msg.userId });
|
|
||||||
|
|
||||||
if (this.stateService.activeAccount.getValue() == null) {
|
if (this.stateService.activeAccount.getValue() == null) {
|
||||||
this.router.navigate(["home"]);
|
this.router.navigate(["home"]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue