Commit 7043d9d4 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

flatpak: Properly filter installed apps

BUG: 446501


(cherry picked from commit ff36b2a2)
parent 4edb0051
......@@ -1296,7 +1296,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;
......@@ -1315,6 +1315,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