From ab9bbf7b0f10b107bc7862a706dfd5a3432802f6 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 30 May 2019 20:24:30 -0400 Subject: [PATCH] save activity --- src/App/App.xaml.cs | 4 ++++ src/App/Pages/BaseContentPage.cs | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/App/App.xaml.cs b/src/App/App.xaml.cs index b1f3fc896..19ae9eb92 100644 --- a/src/App/App.xaml.cs +++ b/src/App/App.xaml.cs @@ -135,6 +135,10 @@ namespace Bit.App protected async override void OnSleep() { System.Diagnostics.Debug.WriteLine("XF App: OnSleep"); + if(Device.RuntimePlatform == Device.Android) + { + await _storageService.SaveAsync(Constants.LastActiveKey, DateTime.UtcNow); + } await HandleLockingAsync(); SetTabsPageFromAutofill(); } diff --git a/src/App/Pages/BaseContentPage.cs b/src/App/Pages/BaseContentPage.cs index 333712807..b59e01aef 100644 --- a/src/App/Pages/BaseContentPage.cs +++ b/src/App/Pages/BaseContentPage.cs @@ -22,12 +22,6 @@ namespace Bit.App.Pages SaveActivity(); } - protected override void OnDisappearing() - { - base.OnDisappearing(); - SaveActivity(); - } - public bool DoOnce(Action action = null, int milliseconds = 1000) { if(LastPageAction.HasValue && (DateTime.UtcNow - LastPageAction.Value).TotalMilliseconds < milliseconds)