mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 18:38:27 +03:00
[SG-800] Selecting notification for inactive account on iOS while app is open does not display the request (#2166)
* [SG-800] Remove await from ActionSheet If the user never answers the pop up, the lock is never released. * [SG-800] Add try catch
This commit is contained in:
parent
02b8e54988
commit
69f02eef82
1 changed files with 12 additions and 5 deletions
|
@ -221,7 +221,9 @@ namespace Bit.App
|
|||
}
|
||||
|
||||
var notificationUserEmail = await _stateService.GetEmailAsync(notification.UserId);
|
||||
await Device.InvokeOnMainThreadAsync(async () =>
|
||||
Device.BeginInvokeOnMainThread(async () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = await _deviceActionService.DisplayAlertAsync(AppResources.LogInRequested, string.Format(AppResources.LoginAttemptFromXDoYouWantToSwitchToThisAccount, notificationUserEmail), AppResources.Cancel, AppResources.Ok);
|
||||
if (result == AppResources.Ok)
|
||||
|
@ -229,6 +231,11 @@ namespace Bit.App
|
|||
await _stateService.SetActiveUserAsync(notification.UserId);
|
||||
_messagingService.Send(AccountsManagerMessageCommands.SWITCHED_ACCOUNT);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LoggerHelper.LogEvenIfCantBeResolved(ex);
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue