From 21c5da59e6c83d7dcd6b4c14e52e1825e8cf9532 Mon Sep 17 00:00:00 2001
From: Patrick Simpson
Date: Wed, 14 Jun 2017 09:38:46 +0200
Subject: [PATCH] [KOE-115] Added check to sync stall detection to see if
anything has synced. If not, it's considered a startup delay and doesn't
trigger the warning
---
.../Features/SyncState/FeatureSyncState.cs | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Features/SyncState/FeatureSyncState.cs b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Features/SyncState/FeatureSyncState.cs
index ce7978e..33a4bdf 100644
--- a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Features/SyncState/FeatureSyncState.cs
+++ b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/Features/SyncState/FeatureSyncState.cs
@@ -409,6 +409,11 @@ namespace Acacia.Features.SyncState
return !string.IsNullOrWhiteSpace(content.synckey);
}
+
+ public bool HasAnythingSynced
+ {
+ get { return Done > 0; }
+ }
}
private void CheckSyncState(ZPushAccount account)
@@ -503,7 +508,8 @@ namespace Acacia.Features.SyncState
if (folderId != null)
{
SyncSession sync = account.GetFeatureData(this, null);
- if (sync.HasFolderSynced(folderId))
+ // If nothing has synced yet, it's probably just a delay
+ if (!sync.HasAnythingSynced || sync.HasFolderSynced(folderId))
return;
}
}