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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user