1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-17 08:43:21 +00:00

Clear intent from autofill. Background app when back button on lock page.

This commit is contained in:
Kyle Spearrin
2017-02-09 18:12:34 -05:00
parent 99e78092ed
commit e970ca49e8
6 changed files with 57 additions and 61 deletions

View File

@@ -0,0 +1,41 @@
using System.Threading.Tasks;
using Acr.UserDialogs;
using Bit.App.Controls;
using Bit.App.Resources;
using Xamarin.Forms;
using XLabs.Ioc;
namespace Bit.App.Pages
{
public class BaseLockPage : ExtendedContentPage
{
public BaseLockPage()
: base(false, false)
{
UserDialogs = Resolver.Resolve<IUserDialogs>();
}
protected IUserDialogs UserDialogs { get; set; }
protected override bool OnBackButtonPressed()
{
if(Device.OS == TargetPlatform.Android)
{
MessagingCenter.Send(Application.Current, "BackgroundApp");
}
return true;
}
protected async Task LogoutAsync()
{
if(!await UserDialogs.ConfirmAsync(AppResources.LogoutConfirmation, null, AppResources.Yes, AppResources.Cancel))
{
return;
}
MessagingCenter.Send(Application.Current, "Logout", (string)null);
}
}
}