Folder: Check etag again after active sync #4116
authorChristian Kamm <mail@ckamm.de>
Tue, 12 Sep 2017 11:02:00 +0000 (13:02 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 5 Oct 2017 20:01:05 +0000 (22:01 +0200)
Maybe more things were happening on the server?

src/gui/folder.cpp

index 6446a06ed3afb3628b6f6d58ab7c218a759cc3a3..ee1a84869d7433a15559f41796396378305ea1aa 100644 (file)
@@ -817,6 +817,17 @@ void Folder::slotSyncFinished(bool success)
 void Folder::slotEmitFinishedDelayed()
 {
     emit syncFinished(_syncResult);
+
+    // Immediately check the etag again if there was some sync activity.
+    if ((_syncResult.status() == SyncResult::Success
+            || _syncResult.status() == SyncResult::Problem)
+        && (_syncResult.firstItemDeleted()
+               || _syncResult.firstItemNew()
+               || _syncResult.firstItemRenamed()
+               || _syncResult.firstItemUpdated()
+               || _syncResult.firstNewConflictItem())) {
+        slotRunEtagJob();
+    }
 }
 
 // the progress comes without a folder and the valid path set. Add that here