mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-11 10:10:25 +01:00
This reverts commit 2665afffdd
.
This commit is contained in:
parent
c3c0c72792
commit
127811166b
@ -1233,18 +1233,6 @@ export default class MainBackground {
|
||||
);
|
||||
}
|
||||
|
||||
// If the user is logged out, switch to the next account
|
||||
const active = await firstValueFrom(this.accountService.activeAccount$);
|
||||
if (active == null) {
|
||||
return;
|
||||
}
|
||||
const authStatus = await firstValueFrom(
|
||||
this.authService.authStatuses$.pipe(map((statuses) => statuses[active.id])),
|
||||
);
|
||||
if (authStatus === AuthenticationStatus.LoggedOut) {
|
||||
const nextUpAccount = await firstValueFrom(this.accountService.nextUpAccount$);
|
||||
await this.switchAccount(nextUpAccount?.id);
|
||||
}
|
||||
await this.initOverlayAndTabsBackground();
|
||||
|
||||
return new Promise<void>((resolve) => {
|
||||
|
@ -151,24 +151,6 @@ export class AccountSwitcherComponent {
|
||||
);
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
const active = await firstValueFrom(this.accountService.activeAccount$);
|
||||
if (active == null) {
|
||||
return;
|
||||
}
|
||||
const authStatus = await firstValueFrom(
|
||||
this.authService.authStatuses$.pipe(map((statuses) => statuses[active.id])),
|
||||
);
|
||||
if (authStatus === AuthenticationStatus.LoggedOut) {
|
||||
const nextUpAccount = await firstValueFrom(this.accountService.nextUpAccount$);
|
||||
if (nextUpAccount != null) {
|
||||
await this.switch(nextUpAccount.id);
|
||||
} else {
|
||||
await this.addAccount();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
toggle() {
|
||||
this.isOpen = !this.isOpen;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user