1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-22 11:13:49 +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

@@ -13,9 +13,11 @@ namespace Bit.App.Pages
{
private readonly IGoogleAnalyticsService _googleAnalyticsService;
private readonly IDeviceInfoService _deviceInfoService;
private readonly MainPage _mainPage;
public ToolsPage()
public ToolsPage(MainPage mainPage)
{
_mainPage = mainPage;
_googleAnalyticsService = Resolver.Resolve<IGoogleAnalyticsService>();
_deviceInfoService = Resolver.Resolve<IDeviceInfoService>();
@@ -113,6 +115,17 @@ namespace Bit.App.Pages
}
protected override bool OnBackButtonPressed()
{
if(Device.RuntimePlatform == Device.Android && _mainPage != null)
{
_mainPage.ResetToVaultPage();
return true;
}
return base.OnBackButtonPressed();
}
private void AutofillCell_Tapped(object sender, EventArgs e)
{
if(_deviceInfoService.AutofillServiceSupported)