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

pk: don't fetch the changelog before we know the package id

parent a9ed9b46
......@@ -205,6 +205,11 @@ void PackageKitResource::setDetails(const PackageKit::Details & details)
void PackageKitResource::fetchChangelog()
const auto pkgid = availablePackageId();
if (pkgid.isEmpty()) {
connect(this, &PackageKitResource::stateChanged, this, &PackageKitResource::fetchChangelog);
PackageKit::Transaction* t = PackageKit::Daemon::getUpdateDetail(availablePackageId());
connect(t, &PackageKit::Transaction::updateDetail, this, &PackageKitResource::updateDetail);
connect(t, &PackageKit::Transaction::errorCode, this, [this](PackageKit::Transaction::Error err, const QString & error) { qWarning() << "error fetching updates:" << err << error; emit changelogFetched(QString()); });
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