check modal stack before popping

This commit is contained in:
Kyle Spearrin 2018-02-01 23:38:18 -05:00
parent d84d11d064
commit 8cdb27fe43
3 changed files with 12 additions and 3 deletions

View file

@ -119,8 +119,11 @@ namespace Bit.App.Pages
if(result.Authenticated)
{
_appSettings.Locked = false;
if(Navigation.ModalStack.Count > 0)
{
await Navigation.PopModalAsync();
}
}
else if(result.Status == FingerprintAuthenticationResultStatus.FallbackRequested)
{
AuthService.LogOut();

View file

@ -155,8 +155,11 @@ namespace Bit.App.Pages
if(key.Key.SequenceEqual(_cryptoService.Key.Key))
{
_appSettingsService.Locked = false;
if(Navigation.ModalStack.Count > 0)
{
await Navigation.PopModalAsync();
}
}
else
{
// TODO: keep track of invalid attempts and logout?

View file

@ -126,8 +126,11 @@ namespace Bit.App.Pages
_appSettingsService.Locked = false;
_appSettingsService.FailedPinAttempts = 0;
PinControl.Entry.Unfocus();
if(Navigation.ModalStack.Count > 0)
{
await Navigation.PopModalAsync();
}
}
else
{
_appSettingsService.FailedPinAttempts++;