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

pk: Provide a fallback to appdata::packageNames

Sometimes it returns empty
parent 70542199
......@@ -168,7 +168,11 @@ void AppPackageKitResource::fetchScreenshots()
QStringList AppPackageKitResource::allPackageNames() const
{
return m_appdata.packageNames();
auto ret = m_appdata.packageNames();
if (ret.isEmpty()) {
ret = QStringList{ PackageKit::Daemon::packageName(availablePackageId()) };
}
return ret;
}
QList<PackageState> AppPackageKitResource::addonsInformation()
......
Supports Markdown
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