Add support for SYNC_PREPARING arg in socket controller reportsyncstate
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Wed, 17 Jul 2024 09:29:03 +0000 (17:29 +0800)
committerClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 23 Jul 2024 06:08:24 +0000 (14:08 +0800)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/macOS/fileprovidersocketcontroller.cpp

index 8b258d0d35cbed32eee42a44783894500a10c0b9..eaa904bdf072c1c35b896d19d9bb07b5f8df016a 100644 (file)
@@ -227,13 +227,15 @@ void FileProviderSocketController::sendAccountDetails() const
 void FileProviderSocketController::reportSyncState(const QString &receivedState)
 {
     auto syncState = SyncResult::Status::Undefined;
-    if (receivedState == QStringLiteral("SYNC_STARTED")) {
+    if (receivedState == "SYNC_PREPARING") {
+        syncState = SyncResult::Status::SyncPrepare;
+    } else if (receivedState == "SYNC_STARTED") {
         syncState = SyncResult::Status::SyncRunning;
-    } else if (receivedState == QStringLiteral("SYNC_FINISHED")) {
+    } else if (receivedState == "SYNC_FINISHED") {
         syncState = SyncResult::Status::Success;
-    } else if (receivedState == QStringLiteral("SYNC_FAILED")) {
+    } else if (receivedState == "SYNC_FAILED") {
         syncState = SyncResult::Status::Problem;
-    } else if (receivedState == QStringLiteral("SYNC_PAUSED")) {
+    } else if (receivedState == "SYNC_PAUSED") {
         syncState = SyncResult::Status::Paused;
     } else {
         qCWarning(lcFileProviderSocketController) << "Unknown sync state received:" << receivedState;