From fecd98ead079e3ee70e1e247c00c6dd606b94f2d Mon Sep 17 00:00:00 2001 From: addison Date: Tue, 16 Nov 2021 10:14:06 -0500 Subject: [PATCH] [bug] Navigate to vault on a succesful account switch --- src/app/layout/account-switcher.component.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/layout/account-switcher.component.ts b/src/app/layout/account-switcher.component.ts index 9651d5c0..816bc4ae 100644 --- a/src/app/layout/account-switcher.component.ts +++ b/src/app/layout/account-switcher.component.ts @@ -6,6 +6,7 @@ import { trigger, } from '@angular/animations'; import { Component, OnInit } from '@angular/core'; +import { Router } from '@angular/router'; import { MessagingService } from 'jslib-common/abstractions/messaging.service'; import { StateService } from 'jslib-common/abstractions/state.service'; @@ -34,7 +35,7 @@ export class AccountSwitcherComponent implements OnInit { activeAccountEmail: string; constructor(private stateService: StateService, private vaultTimeoutService: VaultTimeoutService, - private messagingService: MessagingService) {} + private messagingService: MessagingService, private router: Router) {} async ngOnInit(): Promise { this.stateService.accounts.subscribe(async accounts => { @@ -55,6 +56,7 @@ export class AccountSwitcherComponent implements OnInit { } else { this.messagingService.send('unlocked'); this.messagingService.send('syncVault'); + this.router.navigate(['vault']); } } }