mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 01:48:25 +03:00
lock service fixes
This commit is contained in:
parent
f317f45d14
commit
3eb1ab0452
1 changed files with 5 additions and 2 deletions
|
@ -63,6 +63,10 @@ namespace Bit.Core.Services
|
|||
{
|
||||
return;
|
||||
}
|
||||
if(await IsLockedAsync())
|
||||
{
|
||||
return;
|
||||
}
|
||||
var lockOption = _platformUtilsService.LockTimeout();
|
||||
if(lockOption == null)
|
||||
{
|
||||
|
@ -77,9 +81,8 @@ namespace Bit.Core.Services
|
|||
{
|
||||
return;
|
||||
}
|
||||
var lockOptionsSeconds = lockOption.Value * 60;
|
||||
var diff = DateTime.UtcNow - lastActive.Value;
|
||||
if(diff.TotalSeconds >= lockOptionsSeconds)
|
||||
if(diff.TotalSeconds >= lockOption.Value)
|
||||
{
|
||||
// need to lock now
|
||||
await LockAsync(true);
|
||||
|
|
Loading…
Reference in a new issue