From 3877efba5e8d8739766b705d7caef2e3f9bf07dc Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Wed, 17 Jul 2024 17:28:11 +0800 Subject: [PATCH] Store latest sync state in file provider socket controller Signed-off-by: Claudio Cambra --- src/gui/macOS/fileprovidersocketcontroller.cpp | 4 ++-- src/gui/macOS/fileprovidersocketcontroller.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gui/macOS/fileprovidersocketcontroller.cpp b/src/gui/macOS/fileprovidersocketcontroller.cpp index a5a5b3385e..56cbdb338b 100644 --- a/src/gui/macOS/fileprovidersocketcontroller.cpp +++ b/src/gui/macOS/fileprovidersocketcontroller.cpp @@ -224,7 +224,7 @@ void FileProviderSocketController::sendAccountDetails() const sendMessage(message); } -void FileProviderSocketController::reportSyncState(const QString &receivedState) const +void FileProviderSocketController::reportSyncState(const QString &receivedState) { auto syncState = SyncResult::Status::Undefined; if (receivedState == QStringLiteral("SYNC_STARTED")) { @@ -238,7 +238,7 @@ void FileProviderSocketController::reportSyncState(const QString &receivedState) } else { qCWarning(lcFileProviderSocketController) << "Unknown sync state received:" << receivedState; } - + _latestStatus = syncState; emit syncStateChanged(_accountState->account(), syncState); } diff --git a/src/gui/macOS/fileprovidersocketcontroller.h b/src/gui/macOS/fileprovidersocketcontroller.h index 30741228d8..a1c76b7301 100644 --- a/src/gui/macOS/fileprovidersocketcontroller.h +++ b/src/gui/macOS/fileprovidersocketcontroller.h @@ -54,11 +54,12 @@ private slots: void sendAccountDetails() const; void sendNotAuthenticated() const; - void reportSyncState(const QString &receivedState) const; + void reportSyncState(const QString &receivedState); private: QPointer _socket; AccountStatePtr _accountState; + SyncResult::Status _latestStatus = SyncResult::Undefined; }; } // namespace Mac