1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-15 10:25:20 +01:00

lock service fixes

This commit is contained in:
Kyle Spearrin 2019-05-16 12:29:55 -04:00
parent f317f45d14
commit 3eb1ab0452

View File

@ -63,6 +63,10 @@ namespace Bit.Core.Services
{ {
return; return;
} }
if(await IsLockedAsync())
{
return;
}
var lockOption = _platformUtilsService.LockTimeout(); var lockOption = _platformUtilsService.LockTimeout();
if(lockOption == null) if(lockOption == null)
{ {
@ -77,9 +81,8 @@ namespace Bit.Core.Services
{ {
return; return;
} }
var lockOptionsSeconds = lockOption.Value * 60;
var diff = DateTime.UtcNow - lastActive.Value; var diff = DateTime.UtcNow - lastActive.Value;
if(diff.TotalSeconds >= lockOptionsSeconds) if(diff.TotalSeconds >= lockOption.Value)
{ {
// need to lock now // need to lock now
await LockAsync(true); await LockAsync(true);