From f777856517ce39c4004be61c2661cc15377648fc Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sat, 19 Apr 2025 14:34:44 +0200 Subject: Use GNotifications if Bus.get_proxy never returns the dbus notifications interface --- main/src/ui/application.vala | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'main') diff --git a/main/src/ui/application.vala b/main/src/ui/application.vala index 2463de46..605a7a75 100644 --- a/main/src/ui/application.vala +++ b/main/src/ui/application.vala @@ -46,16 +46,12 @@ public class Dino.Ui.Application : Adw.Application, Dino.Application { 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. - try { - DBusNotifications? dbus_notifications = get_notifications_dbus.end(res); - if (dbus_notifications != null) { - FreeDesktopNotifier free_desktop_notifier = new FreeDesktopNotifier(stream_interactor, dbus_notifications); - notification_events.register_notification_provider.begin(free_desktop_notifier); - } else { - notification_events.register_notification_provider.begin(new GNotificationsNotifier(stream_interactor)); - } - } catch (Error e) { - debug("Failed accessing fdo notification server: %s", e.message); + DBusNotifications? dbus_notifications = get_notifications_dbus.end(res); + if (dbus_notifications != null) { + FreeDesktopNotifier free_desktop_notifier = new FreeDesktopNotifier(stream_interactor, dbus_notifications); + notification_events.register_notification_provider.begin(free_desktop_notifier); + } else { + notification_events.register_notification_provider.begin(new GNotificationsNotifier(stream_interactor)); } }); -- cgit v1.3