Commit 08fe9f86 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by 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


(cherry picked from commit e429cd3e)
parent 6fac38f9
Pipeline #180946 passed with stage
in 58 seconds
......@@ -74,10 +74,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