From c61e889f209fd07cbff94147df38609de13e3766 Mon Sep 17 00:00:00 2001 From: frosty Date: Wed, 26 Aug 2026 15:55:22 -0400 Subject: feat: add launcher badge --- main/src/ui/application.vala | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'main/src/ui/application.vala') diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 9ac512d9..b72a8d0e 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -14,6 +14,7 @@ public class Dino.Ui.Application : Adw.Application, Dino.Application { public MainWindow window; public MainWindowController controller; + private LauncherBadge? launcher_badge; private StatusNotifierItem? status_notifier_item; public Database db { get; set; } @@ -50,6 +51,12 @@ public class Dino.Ui.Application : Adw.Application, Dino.Application { warning("Could not create Dino's tray icon: %s", e.message); } + try { + launcher_badge = new LauncherBadge(stream_interactor); + } catch (IOError e) { + warning("Could not create Dino's launcher badge: %s", e.message); + } + NotificationEvents notification_events = stream_interactor.get_module(NotificationEvents.IDENTITY); get_notifications_dbus.begin((_, res) => { // It might take a bit to get the interface. NotificationEvents will queue any notifications in the meantime. @@ -76,6 +83,10 @@ public class Dino.Ui.Application : Adw.Application, Dino.Application { }); shutdown.connect(() => { + if (launcher_badge != null) { + launcher_badge.shutdown(); + launcher_badge = null; + } if (status_notifier_item != null) { status_notifier_item.shutdown(); status_notifier_item = null; -- cgit v1.3