Merge pull request #352 from nextcloud/upstream/pr/6438

Folders: Use "Problem" icon for unresolved conflicts #6277
This commit is contained in:
Roeland Jago Douma 2018-06-05 20:07:00 +02:00 committed by GitHub
commit a7b7344659
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -248,9 +248,15 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
} else if (status == SyncResult::Undefined) {
return theme->syncStateIcon(SyncResult::SyncRunning);
} else {
// keep the previous icon for the prepare phase.
if (status == SyncResult::Problem) {
// The "Problem" *result* just means some files weren't
// synced, so we show "Success" in these cases. But we
// do use the "Problem" *icon* for unresolved conflicts.
if (status == SyncResult::Success || status == SyncResult::Problem) {
if (f->syncResult().hasUnresolvedConflicts()) {
return theme->syncStateIcon(SyncResult::Problem);
} else {
return theme->syncStateIcon(SyncResult::Success);
}
} else {
return theme->syncStateIcon(status);
}