Commit 13bf9eaa authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧

odrs: only show passive messages once

parent 14f9ffd2
......@@ -109,7 +109,6 @@ FlatpakBackend::FlatpakBackend(QObject* parent)
SourcesModel::global()->addSourcesBackend(m_sources);
}
connect(m_reviews.data(), &OdrsReviewsBackend::error, this, &FlatpakBackend::passiveMessage);
connect(m_reviews.data(), &OdrsReviewsBackend::ratingsReady, this, [this] {
m_reviews->emitRatingFetched(this, kTransform<QList<AbstractResource*>>(m_resources.values(), [] (AbstractResource* r) { return r; }));
});
......
......@@ -97,7 +97,6 @@ PackageKitBackend::PackageKitBackend(QObject* parent)
connect(PackageKit::Daemon::global(), &PackageKit::Daemon::restartScheduled, m_updater, &PackageKitUpdater::enableNeedsReboot);
connect(PackageKit::Daemon::global(), &PackageKit::Daemon::isRunningChanged, this, &PackageKitBackend::checkDaemonRunning);
connect(m_reviews.data(), &OdrsReviewsBackend::error, this, &PackageKitBackend::passiveMessage);
connect(m_reviews.data(), &OdrsReviewsBackend::ratingsReady, this, [this] {
m_reviews->emitRatingFetched(this, kTransform<QList<AbstractResource*>>(m_packages.packages.values(), [] (AbstractResource* r) { return r; }));
});
......
......@@ -71,7 +71,6 @@ SnapBackend::SnapBackend(QObject* parent)
, m_updater(new StandardBackendUpdater(this))
, m_reviews(AppStreamIntegration::global()->reviews())
{
connect(m_reviews.data(), &OdrsReviewsBackend::error, this, &SnapBackend::passiveMessage);
connect(m_reviews.data(), &OdrsReviewsBackend::ratingsReady, this, [this] {
m_reviews->emitRatingFetched(this, kTransform<QList<AbstractResource*>>(m_resources.values(), [] (AbstractResource* r) { return r; }));
});
......
......@@ -148,6 +148,7 @@ void ResourcesModel::addResourcesBackend(AbstractResourcesBackend* backend)
connect(backend, &AbstractResourcesBackend::fetchingUpdatesProgressChanged, this, [this] { m_fetchingUpdatesProgress.reevaluate(); });
connect(backend, &AbstractResourcesBackend::resourceRemoved, this, &ResourcesModel::resourceRemoved);
connect(backend, &AbstractResourcesBackend::passiveMessage, this, &ResourcesModel::passiveMessage);
connect(backend->reviewsBackend(), &AbstractReviewsBackend::error, this, &ResourcesModel::passiveMessage, Qt::UniqueConnection);
connect(backend->backendUpdater(), &AbstractBackendUpdater::progressingChanged, this, &ResourcesModel::slotFetching);
// In case this is in fact the first backend to be added, and also happens to be
......
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