mirror of
https://github.com/bitwarden/android.git
synced 2024-11-01 07:35:52 +03:00
null check on SyncIfNeeded
This commit is contained in:
parent
ce751cfc87
commit
325b557506
1 changed files with 1 additions and 1 deletions
|
@ -367,7 +367,7 @@ namespace Bit.App
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
{
|
{
|
||||||
var lastSync = await _syncService.GetLastSyncAsync();
|
var lastSync = await _syncService.GetLastSyncAsync();
|
||||||
if(DateTime.UtcNow - lastSync > TimeSpan.FromMinutes(30))
|
if(lastSync == null || ((DateTime.UtcNow - lastSync) > TimeSpan.FromMinutes(30)))
|
||||||
{
|
{
|
||||||
await _syncService.FullSyncAsync(false);
|
await _syncService.FullSyncAsync(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue