mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 14:36:01 +03:00
Ensure all sync result status types are handled for file provider in owncloudgui
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
3194edb063
commit
1128d9d668
1 changed files with 21 additions and 4 deletions
|
@ -311,11 +311,28 @@ void ownCloudGui::slotComputeOverallSyncStatus()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const auto fileProvider = Mac::FileProvider::instance();
|
const auto fileProvider = Mac::FileProvider::instance();
|
||||||
const auto latestStatus = fileProvider->socketServer()->latestReceivedSyncStatusForAccount(accountState->account());
|
|
||||||
if (latestStatus == SyncResult::Problem || latestStatus == SyncResult::Error || !fileProvider->xpc()->fileProviderExtReachable(accountFpId)) {
|
if (!fileProvider->xpc()->fileProviderExtReachable(accountFpId)) {
|
||||||
problemFileProviderAccounts.append(accountFpId);
|
problemFileProviderAccounts.append(accountFpId);
|
||||||
} else if (latestStatus == SyncResult::SyncRunning) {
|
} else {
|
||||||
syncingFileProviderAccounts.append(accountFpId);
|
switch (const auto latestStatus = fileProvider->socketServer()->latestReceivedSyncStatusForAccount(accountState->account())) {
|
||||||
|
case SyncResult::Undefined:
|
||||||
|
case SyncResult::NotYetStarted:
|
||||||
|
break;
|
||||||
|
case SyncResult::SyncPrepare:
|
||||||
|
case SyncResult::SyncRunning:
|
||||||
|
case SyncResult::SyncAbortRequested:
|
||||||
|
case SyncResult::Success:
|
||||||
|
syncingFileProviderAccounts.append(accountFpId);
|
||||||
|
break;
|
||||||
|
case SyncResult::Problem:
|
||||||
|
case SyncResult::Error:
|
||||||
|
case SyncResult::SetupError:
|
||||||
|
problemFileProviderAccounts.append(accountFpId);
|
||||||
|
break;
|
||||||
|
case SyncResult::Paused:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue