1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-15 15:53:44 +00:00

Added "first load" check on site list to wait for sync to complete if key changed. Renamed "other" constants.

This commit is contained in:
Kyle Spearrin
2016-08-05 23:58:31 -04:00
parent d96a94b478
commit 38184e4893
18 changed files with 54 additions and 26 deletions

View File

@@ -31,7 +31,7 @@ namespace Bit.App.Services
}
// Are we forcing a lock? (i.e. clicking a button to lock the app manually, immediately)
if(!forceLock && !_settings.GetValueOrDefault(Constants.SettingLocked, false))
if(!forceLock && !_settings.GetValueOrDefault(Constants.Locked, false))
{
// Lock seconds tells if they want to lock the app or not
var lockSeconds = _settings.GetValueOrDefault(Constants.SettingLockSeconds, 60 * 15);
@@ -42,7 +42,7 @@ namespace Bit.App.Services
// Has it been longer than lockSeconds since the last time the app was backgrounded?
var now = DateTime.UtcNow;
var lastBackground = _settings.GetValueOrDefault(Constants.SettingLastBackgroundedDate, now.AddYears(-1));
var lastBackground = _settings.GetValueOrDefault(Constants.LastBackgroundedDate, now.AddYears(-1));
if((now - lastBackground).TotalSeconds < lockSeconds)
{
return LockType.None;