Commit ff36b2a2 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

flatpak: Properly filter installed apps

BUG: 446501
parent b2d7bd8a
Pipeline #110174 passed with stage
in 1 minute and 10 seconds
......@@ -1342,7 +1342,7 @@ ResultsStream *FlatpakBackend::search(const AbstractResourcesBackend::Filters &f
return stream;
} else if (filter.state == AbstractResource::Installed) {
auto stream = new ResultsStream(QStringLiteral("FlatpakStream-installed"));
auto f = [this, stream] {
auto f = [this, stream, filter] {
QVector<AbstractResource *> resources;
for (auto installation : m_installations) {
g_autoptr(GError) localError = nullptr;
......@@ -1361,6 +1361,9 @@ ResultsStream *FlatpakBackend::search(const AbstractResourcesBackend::Filters &f
continue;
auto resource = getAppForInstalledRef(installation, ref);
if (!filter.search.isEmpty() && !resource->name().contains(filter.search, Qt::CaseInsensitive))
continue;
if (resource->resourceType() == FlatpakResource::Runtime) {
resources.prepend(resource);
} 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