aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2025-04-19 14:34:44 +0200
committerfiaxh <git@lightrise.org>2025-12-19 12:14:28 +0100
commitf777856517ce39c4004be61c2661cc15377648fc (patch)
tree2fad5d39e0c076cf42642554cd09b39ddb936791 /main/src/ui
parentb4697cd2637453a7ece57d8e38edd05d36d9ffae (diff)
Use GNotifications if Bus.get_proxy never returns the dbus notifications interface
Diffstat (limited to 'main/src/ui')
-rw-r--r--main/src/ui/application.vala16
1 files changed, 6 insertions, 10 deletions
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));
}
});