mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Store latest sync state in file provider socket controller
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
3415f39c16
commit
3877efba5e
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -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<QLocalSocket> _socket;
|
||||
AccountStatePtr _accountState;
|
||||
SyncResult::Status _latestStatus = SyncResult::Undefined;
|
||||
};
|
||||
|
||||
} // namespace Mac
|
||||
|
||||
Loading…
Reference in New Issue
Block a user