summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <[email protected]>2018-05-31 02:27:00 +0200
committerAleix Pol <[email protected]>2018-05-31 02:27:13 +0200
commit898cddd9e8ccdd108778c45e0d3d4dd300d1acf3 (patch)
tree1f0d0376a25072c933f63ebadf6d9679003abcde
parentc01a0cee7ac60f7ec26e0710df6bbb1bcfddd889 (diff)
Simplify logic
-rw-r--r--libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp b/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
index 4228b3f..d9dad5f 100644
--- a/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
+++ b/libdiscover/backends/FlatpakBackend/FlatpakBackend.cpp
@@ -1094,10 +1094,10 @@ ResultsStream * FlatpakBackend::search(const AbstractResourcesBackend::Filters &
fetchResourceJob->start();
return stream;
- } else if ((!filter.resourceUrl.isEmpty() && filter.resourceUrl.scheme() != QLatin1String("appstream")) || !filter.extends.isEmpty())
- return new ResultsStream(QStringLiteral("FlatpakStream-void"), {});
- else if(filter.resourceUrl.scheme() == QLatin1String("appstream"))
+ } else if(filter.resourceUrl.scheme() == QLatin1String("appstream")) {
return findResourceByPackageName(filter.resourceUrl);
+ } else if (!filter.resourceUrl.isEmpty() || !filter.extends.isEmpty())
+ return new ResultsStream(QStringLiteral("FlatpakStream-void"), {});
QVector<AbstractResource*> ret;
foreach(AbstractResource* r, m_resources) {