1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 07:43:37 +00:00

Track activity more accurately throughout the app & extension so that lock screen is not presented prematurly.

This commit is contained in:
Kyle Spearrin
2016-08-08 19:00:36 -04:00
parent 36629b0855
commit d3b1fed9b7
12 changed files with 34 additions and 14 deletions

View File

@@ -40,9 +40,9 @@ namespace Bit.App.Services
return LockType.None;
}
// Has it been longer than lockSeconds since the last time the app was backgrounded?
// Has it been longer than lockSeconds since the last time the app was used?
var now = DateTime.UtcNow;
var lastBackground = _settings.GetValueOrDefault(Constants.LastBackgroundedDate, now.AddYears(-1));
var lastBackground = _settings.GetValueOrDefault(Constants.LastActivityDate, now.AddYears(-1));
if((now - lastBackground).TotalSeconds < lockSeconds)
{
return LockType.None;