Commit c166ec57 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

Properly filter urls

parent 3d23e959
......@@ -66,10 +66,10 @@ static ResultsStream* voidStream() { return new ResultsStream(QStringLiteral("Sn
ResultsStream * SnapBackend::search(const AbstractResourcesBackend::Filters& filters)
{
if ((filters.category && filters.category->isAddons()) || filters.resourceUrl.scheme() != QLatin1String("snap"))
return voidStream();
if (!filters.resourceUrl.isEmpty()) {
return findResourceByPackageName(filters.resourceUrl);
} else if (filters.category && filters.category->isAddons()) {
return voidStream();
} else if (filters.state >= AbstractResource::Installed) {
return populate(m_client.list(), AbstractResource::Installed);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment