mirror of
https://github.com/bitwarden/mobile
synced 2025-12-16 00:03:22 +00:00
Incremental sync only every 30 minutes
This commit is contained in:
@@ -167,6 +167,17 @@ namespace Bit.App.Services
|
||||
return true;
|
||||
}
|
||||
|
||||
public async Task<bool> IncrementalSyncAsync(TimeSpan syncThreshold)
|
||||
{
|
||||
DateTime? lastSync = _settings.GetValueOrDefault<DateTime?>(LastSyncKey);
|
||||
if(lastSync != null && DateTime.UtcNow - lastSync.Value < syncThreshold)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return await IncrementalSyncAsync();
|
||||
}
|
||||
|
||||
public async Task<bool> IncrementalSyncAsync()
|
||||
{
|
||||
if(!_authService.IsAuthenticated)
|
||||
|
||||
Reference in New Issue
Block a user