Fix for vault timeout not firing on resume (#1775)

* fix for vault timeout not firing on resume

* call ResumedAsync with FireAndForget
This commit is contained in:
Matt Portune 2022-02-14 11:29:04 -05:00 committed by GitHub
parent 615136be96
commit 3127295444
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 5 deletions

View File

@ -97,7 +97,7 @@ namespace Bit.App
{
if (Device.RuntimePlatform == Device.iOS)
{
ResumedAsync();
ResumedAsync().FireAndForget();
}
}
else if (message.Command == "slept")
@ -205,7 +205,7 @@ namespace Bit.App
_isResumed = true;
if (Device.RuntimePlatform == Device.Android)
{
ResumedAsync();
ResumedAsync().FireAndForget();
}
}
@ -215,12 +215,11 @@ namespace Bit.App
_messagingService.Send("stopEventTimer");
}
private async void ResumedAsync()
private async Task ResumedAsync()
{
await UpdateThemeAsync();
await _vaultTimeoutService.CheckVaultTimeoutAsync();
_messagingService.Send("startEventTimer");
await UpdateThemeAsync();
await ClearCacheIfNeededAsync();
Prime();
SyncIfNeeded();