wip autofill tweaks

This commit is contained in:
Kyle Spearrin 2017-01-31 00:30:41 -05:00
parent 95b8efae20
commit 47e427a851

View file

@ -61,7 +61,6 @@ namespace Bit.App
SetCulture();
SetStyles();
WasFromAutofillService = !string.IsNullOrWhiteSpace(_uri);
if(authService.IsAuthenticated && _uri != null)
{
MainPage = new ExtendedNavigationPage(new VaultAutofillListLoginsPage(_uri));
@ -95,6 +94,7 @@ namespace Bit.App
protected async override void OnStart()
{
// Handle when your app starts
ResumeFromAutofill();
await CheckLockAsync(false);
_databaseService.CreateTables();
await Task.Run(() => FullSyncAsync()).ConfigureAwait(false);
@ -123,15 +123,10 @@ namespace Bit.App
// Handle when your app resumes
Debug.WriteLine("OnResume");
ResumeFromAutofill();
if(Device.OS == TargetPlatform.Android)
{
if(WasFromAutofillService)
{
WasFromAutofillService = false;
MainPage = new MainPage();
}
await CheckLockAsync(false);
}
@ -142,6 +137,19 @@ namespace Bit.App
}
}
private void ResumeFromAutofill()
{
if(Device.OS == TargetPlatform.Android && WasFromAutofillService)
{
WasFromAutofillService = false;
MainPage = new MainPage();
}
else
{
WasFromAutofillService = !string.IsNullOrWhiteSpace(_uri);
}
}
private async Task IncrementalSyncAsync()
{
if(_connectivity.IsConnected)