Do not switch accounts if it is already the active account (#1229)
This commit is contained in:
parent
f32b917a9f
commit
d885e3296b
|
@ -89,8 +89,12 @@ export class AccountSwitcherComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
async switch(userId: string) {
|
async switch(userId: string) {
|
||||||
this.messagingService.send("switchAccount", { userId: userId });
|
|
||||||
this.toggle();
|
this.toggle();
|
||||||
|
|
||||||
|
if (userId === (await this.stateService.getUserId())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.messagingService.send("switchAccount", { userId: userId });
|
||||||
}
|
}
|
||||||
|
|
||||||
private async createSwitcherAccounts(baseAccounts: {
|
private async createSwitcherAccounts(baseAccounts: {
|
||||||
|
|
Loading…
Reference in New Issue