only enable sync-in-background mode when file is already cached
This commit is contained in:
@@ -81,11 +81,12 @@ namespace keepass2android
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_app.SyncInBackgroundPreference && fileStorage is IOfflineSwitchable offlineSwitchable)
|
if (_app.SyncInBackgroundPreference && fileStorage is CachingFileStorage cachingFileStorage &&
|
||||||
|
cachingFileStorage.IsCached(_ioc))
|
||||||
{
|
{
|
||||||
offlineSwitchable.IsOffline = true;
|
cachingFileStorage.IsOffline = true;
|
||||||
//no warning. We'll trigger a sync later.
|
//no warning. We'll trigger a sync later.
|
||||||
offlineSwitchable.TriggerWarningWhenFallingBackToCache = false;
|
cachingFileStorage.TriggerWarningWhenFallingBackToCache = false;
|
||||||
requiresSubsequentSync = true;
|
requiresSubsequentSync = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user