feat(ui): sort search results by provider then name
Group aggregated search results per provider (in query order, pacman first) and sort each group alphabetically, case-insensitively. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
3 files changed
+88
No files matched your search
@@ -42,6 +42,12 @@ void SearchWorker::run() {
|
||||
}
|
||||
// One row per package name, whatever the number of providers offering it.
|
||||
mergeProviderDuplicates(results);
|
||||
|
||||
// Group by provider (query order), then sort alphabetically within each.
|
||||
std::vector<std::string> providerOrder;
|
||||
for (IPackageManager* pm : m_providers) providerOrder.push_back(pm->getName());
|
||||
sortByProviderThenName(results, providerOrder);
|
||||
|
||||
emit finished(results);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user