1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-06 10:34:07 +00:00

Settings plusin doesn't support string null values for default on android. ref https://github.com/jamesmontemagno/SettingsPlugin/issues/8

This commit is contained in:
Kyle Spearrin
2016-08-29 23:06:29 -04:00
parent c7e81ed69f
commit ee883571da
7 changed files with 33 additions and 18 deletions

View File

@@ -170,7 +170,7 @@ namespace Bit.App.Services
public async Task<bool> IncrementalSyncAsync(TimeSpan syncThreshold)
{
DateTime? lastSync = _settings.GetValueOrDefault<DateTime?>(Constants.LastSync);
DateTime? lastSync = _settings.GetValueOrDefault<DateTime?>(Constants.LastSync, null);
if(lastSync != null && DateTime.UtcNow - lastSync.Value < syncThreshold)
{
return false;
@@ -187,7 +187,7 @@ namespace Bit.App.Services
}
var now = DateTime.UtcNow;
DateTime? lastSync = _settings.GetValueOrDefault<DateTime?>(Constants.LastSync);
DateTime? lastSync = _settings.GetValueOrDefault<DateTime?>(Constants.LastSync, null);
if(lastSync == null)
{
return await FullSyncAsync().ConfigureAwait(false);