From 8e9becd579e93fbb55a6917b4b070355327123a7 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 3 Feb 2017 00:12:53 -0500 Subject: [PATCH] dont main page on sleep --- src/App/App.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/App/App.cs b/src/App/App.cs index 79c2f67a9..51d28b502 100644 --- a/src/App/App.cs +++ b/src/App/App.cs @@ -95,7 +95,7 @@ namespace Bit.App MessagingCenter.Subscribe(Current, "SetMainPage", (sender) => { - _setMainPageCancellationTokenSource = SetMainPageFromAutofill(_setMainPageCancellationTokenSource, 1000); + _setMainPageCancellationTokenSource = SetMainPageFromAutofill(_setMainPageCancellationTokenSource, 500); }); MessagingCenter.Subscribe(Current, "SetMainPageNow", (sender) => @@ -118,8 +118,7 @@ namespace Bit.App { // Handle when your app sleeps Debug.WriteLine("OnSleep"); - - _setMainPageCancellationTokenSource = SetMainPageFromAutofill(_setMainPageCancellationTokenSource, 1000); + if(Device.OS == TargetPlatform.Android && !TopPageIsLock()) { _settings.AddOrUpdateValue(Constants.LastActivityDate, DateTime.UtcNow); @@ -157,10 +156,6 @@ namespace Bit.App } previousCts?.Cancel(); - if(!FromAutofillService || string.IsNullOrWhiteSpace(_uri)) - { - return null; - } var cts = new CancellationTokenSource(); Task.Run(async () =>