From ea6b68f8206cc483fa4024a5cdb0ceadf6c04ad3 Mon Sep 17 00:00:00 2001 From: Erik Reider <35975961+ErikReider@users.noreply.github.com> Date: Sat, 25 Jun 2022 20:54:02 +0200 Subject: [PATCH] Fixed bug where replacing notifitions aren't visible --- src/notiDaemon/notiDaemon.vala | 8 ++-- src/notificationWindow/notificationWindow.ui | 2 +- .../notificationWindow.vala | 45 ++++++++++--------- 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/notiDaemon/notiDaemon.vala b/src/notiDaemon/notiDaemon.vala index d132ea5..60fafdd 100644 --- a/src/notiDaemon/notiDaemon.vala +++ b/src/notiDaemon/notiDaemon.vala @@ -51,7 +51,7 @@ namespace SwayNotificationCenter { /** Method to close notification and send DISMISSED signal */ public void manually_close_notification (uint32 id, bool timeout) throws DBusError, IOError { - NotificationWindow.instance.close_notification (id); + NotificationWindow.instance.close_notification (id, false); if (!timeout) { control_center.close_notification (id); NotificationClosed (id, ClosedReasons.DISMISSED); @@ -155,7 +155,7 @@ namespace SwayNotificationCenter { // Replace notification logic if (id == replaces_id) { param.replaces = true; - NotificationWindow.instance.close_notification (id); + NotificationWindow.instance.close_notification (id, true); control_center.close_notification (id, true); } else if (param.synchronous != null && param.synchronous.length > 0) { @@ -166,7 +166,7 @@ namespace SwayNotificationCenter { param.synchronous, null, out r_id)) { param.replaces = true; // Close the notification - NotificationWindow.instance.close_notification (r_id); + NotificationWindow.instance.close_notification (r_id, true); control_center.close_notification (r_id, true); } synchronous_ids.set (param.synchronous, id); @@ -253,7 +253,7 @@ namespace SwayNotificationCenter { */ [DBus (name = "CloseNotification")] public void close_notification (uint32 id) throws DBusError, IOError { - NotificationWindow.instance.close_notification (id); + NotificationWindow.instance.close_notification (id, false); control_center.close_notification (id); NotificationClosed (id, ClosedReasons.CLOSED_BY_CLOSENOTIFICATION); } diff --git a/src/notificationWindow/notificationWindow.ui b/src/notificationWindow/notificationWindow.ui index 50a559b..2eab4c0 100644 --- a/src/notificationWindow/notificationWindow.ui +++ b/src/notificationWindow/notificationWindow.ui @@ -2,7 +2,7 @@ -