[gnome-builder] update-manager: Make sure there's only one update notification
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] update-manager: Make sure there's only one update notification
- Date: Sun, 21 Feb 2021 18:24:57 +0000 (UTC)
commit 1bfb061ae0904259fd0789a6541a9f3c09ca18b1
Author: vanadiae <vanadiae35 gmail com>
Date: Sun Feb 21 15:09:27 2021 +0100
update-manager: Make sure there's only one update notification
Currently when running Builder nightly there's frequently updates, so
during a full day it might happen that the flatpak portal sends an
"update available" signal several times.
But the plugin currently doesn't replace the old update notification
with a newer one, so they start to pile up in the build popover.
So this commit stops early in the "update available" signal callback in
case a notification is already there.
src/plugins/update-manager/gbp-update-manager-app-addin.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/plugins/update-manager/gbp-update-manager-app-addin.c
b/src/plugins/update-manager/gbp-update-manager-app-addin.c
index 765e238f7..18ea727ac 100644
--- a/src/plugins/update-manager/gbp-update-manager-app-addin.c
+++ b/src/plugins/update-manager/gbp-update-manager-app-addin.c
@@ -133,6 +133,12 @@ on_update_available_cb (GbpUpdateManagerAppAddin *self,
g_assert (GBP_IS_UPDATE_MANAGER_APP_ADDIN (self));
g_assert (XDP_IS_PORTAL (portal));
+ /* The flatpak portal will send an "update available" signal each time a new
+ * flatpak push of Builder happens, so it's better to not let notifications pile up.
+ */
+ if (self->update_notif)
+ return;
+
if (self->app != NULL)
{
IdeWorkbench *workbench;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]