diff options
| author | frosty <gabriel@bwaaa.monster> | 2026-08-26 15:55:22 -0400 |
|---|---|---|
| committer | frosty <gabriel@bwaaa.monster> | 2026-08-26 15:55:22 -0400 |
| commit | c61e889f209fd07cbff94147df38609de13e3766 (patch) | |
| tree | 0ebc5beb48bacdaab1362f3926a0a1f4081ff8b5 /main/src/ui/application.vala | |
| parent | 2ba1fe874070fc372c1a522c5c5b97173fbe1459 (diff) | |
feat: add launcher badge
Diffstat (limited to 'main/src/ui/application.vala')
| -rw-r--r-- | main/src/ui/application.vala | 11 |
1 files changed, 11 insertions, 0 deletions
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; |
