save activity

This commit is contained in:
Kyle Spearrin 2019-05-30 20:24:30 -04:00
parent cf2308a12d
commit ab9bbf7b0f
2 changed files with 4 additions and 6 deletions

View file

@ -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();
}

View file

@ -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)