1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-12-18 15:37:42 +01:00

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() protected async override void OnSleep()
{ {
System.Diagnostics.Debug.WriteLine("XF App: OnSleep"); System.Diagnostics.Debug.WriteLine("XF App: OnSleep");
if(Device.RuntimePlatform == Device.Android)
{
await _storageService.SaveAsync(Constants.LastActiveKey, DateTime.UtcNow);
}
await HandleLockingAsync(); await HandleLockingAsync();
SetTabsPageFromAutofill(); SetTabsPageFromAutofill();
} }

View File

@ -22,12 +22,6 @@ namespace Bit.App.Pages
SaveActivity(); SaveActivity();
} }
protected override void OnDisappearing()
{
base.OnDisappearing();
SaveActivity();
}
public bool DoOnce(Action action = null, int milliseconds = 1000) public bool DoOnce(Action action = null, int milliseconds = 1000)
{ {
if(LastPageAction.HasValue && (DateTime.UtcNow - LastPageAction.Value).TotalMilliseconds < milliseconds) if(LastPageAction.HasValue && (DateTime.UtcNow - LastPageAction.Value).TotalMilliseconds < milliseconds)