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

flatpak notifier: Be more precise about when notifying about updates

We want to notify about the global flatpak updates having changed, not a
specific installation
parent 0187b2bc
Pipeline #180945 passed with stage
in 1 minute and 1 second
......@@ -76,10 +76,13 @@ void FlatpakNotifier::recheckSystemUpdateNeeded()
void FlatpakNotifier::onFetchUpdatesFinished(Installation *installation, bool hasUpdates)
{
const bool changed = this->hasUpdates() != hasUpdates;
if (installation->m_hasUpdates == hasUpdates) {
return;
}
bool hadUpdates = this->hasUpdates();
installation->m_hasUpdates = hasUpdates;
if (changed) {
if (hadUpdates != this->hasUpdates()) {
Q_EMIT foundUpdates();
}
}
......
......@@ -50,6 +50,7 @@ public:
Installation m_user;
Installation m_system;
GCancellable *const m_cancellable;
bool m_lastHasUpdates = false;
};
#endif
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