summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <[email protected]>2018-06-06 01:18:56 +0200
committerAleix Pol <[email protected]>2018-06-06 01:18:56 +0200
commit40a9fd6548fdb8dbc6ec4442eaa071c81d5be1ca (patch)
tree509e19d0805f518a89080bf7db22dea937fa1cd0
parent97a0543091bd5567bb12d9b29a65b974b7c94ae9 (diff)
Fix looking for popular applications by appstream id
When looking for an appstream id that is reported times, just show the first that is offered, the user will choose among the sources. It doesn't make any sense to fail because there's several.
-rw-r--r--discover/DiscoverObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/discover/DiscoverObject.cpp b/discover/DiscoverObject.cpp
index 4e38c2a..ec0bc9d 100644
--- a/discover/DiscoverObject.cpp
+++ b/discover/DiscoverObject.cpp
@@ -241,7 +241,7 @@ void DiscoverObject::openApplication(const QUrl& url)
auto stream = new StoredResultsStream({ResourcesModel::global()->search(f)});
connect(stream, &StoredResultsStream::finished, this, [this, url, stream]() {
const auto res = stream->resources();
- if (res.count() == 1) {
+ if (res.count() >= 1) {
emit openApplicationInternal(res.first());
} else {
setRootObjectProperty("defaultStartup", true);