mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
gui/macOS: Sort materialised files by size in model
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
7c45bb7c10
commit
da5c3c8532
@ -160,7 +160,11 @@ void FileProviderMaterialisedItemsModel::setItems(const QVector<FileProviderItem
|
||||
}
|
||||
|
||||
beginResetModel();
|
||||
// We are using this in the "Free up space" dialog so, sort by size.
|
||||
_items = items;
|
||||
std::ranges::sort(_items, [](const auto &a, const auto &b) {
|
||||
return a.documentSize() > b.documentSize();
|
||||
});
|
||||
endResetModel();
|
||||
|
||||
Q_EMIT itemsChanged();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user