1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 09:13:15 +00:00

fix for logging out active account from switcher and cleanup (#1830)

This commit is contained in:
Matt Portune
2022-03-07 15:15:21 -05:00
committed by GitHub
parent fcc94d85af
commit 17cdc96352
6 changed files with 38 additions and 42 deletions

View File

@@ -240,6 +240,13 @@ namespace Bit.App.Utilities
await platformUtilsService.ShowDialogAsync(text, title, AppResources.Yes, AppResources.Cancel);
if (confirmed)
{
var stateService = ServiceContainer.Resolve<IStateService>("stateService");
if (await stateService.IsActiveAccountAsync(userId))
{
var messagingService = ServiceContainer.Resolve<IMessagingService>("messagingService");
messagingService.Send("logout");
return selection;
}
await LogOutAsync(userId, true);
}
}
@@ -509,7 +516,7 @@ namespace Bit.App.Utilities
var policyService = ServiceContainer.Resolve<IPolicyService>("policyService");
var searchService = ServiceContainer.Resolve<ISearchService>("searchService");
var isActiveAccount = await stateService.IsActiveAccount(userId);
var isActiveAccount = await stateService.IsActiveAccountAsync(userId);
if (userId == null)
{