1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-06 10:34:07 +00:00

android back on main pages goes to vault first

This commit is contained in:
Kyle Spearrin
2018-01-08 11:33:51 -05:00
parent 8f77df4ebb
commit 3f1aab27d6
5 changed files with 691 additions and 643 deletions

View File

@@ -20,11 +20,13 @@ namespace Bit.App.Pages
private readonly IDeviceActionService _deviceActionService;
private readonly IDeviceInfoService _deviceInfoService;
private readonly ILockService _lockService;
private readonly MainPage _mainPage;
// TODO: Model binding context?
public SettingsPage()
public SettingsPage(MainPage mainPage)
{
_mainPage = mainPage;
_authService = Resolver.Resolve<IAuthService>();
_settings = Resolver.Resolve<ISettings>();
_fingerprint = Resolver.Resolve<IFingerprint>();
@@ -266,6 +268,17 @@ namespace Bit.App.Pages
}
}
protected override bool OnBackButtonPressed()
{
if(Device.RuntimePlatform == Device.Android && _mainPage != null)
{
_mainPage.ResetToVaultPage();
return true;
}
return base.OnBackButtonPressed();
}
private async void TwoStepCell_Tapped(object sender, EventArgs e)
{
var confirmed = await DisplayAlert(null, AppResources.TwoStepLoginConfirmation, AppResources.Yes,