From 2be313d1d24cd5e4784a1a00b0860711bf64fdfb Mon Sep 17 00:00:00 2001 From: Raymondila Date: Tue, 12 Aug 2025 01:20:59 +0300 Subject: [PATCH] fix: ghost notification --- modules/notifications.py | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/modules/notifications.py b/modules/notifications.py index a4a21c97..068ae6a1 100644 --- a/modules/notifications.py +++ b/modules/notifications.py @@ -1322,15 +1322,6 @@ def on_notification_closed(self, notification, reason): ) notif_box.destroy() - if len(self.notifications) == 1: - self._is_destroying = True - self.main_revealer.set_reveal_child(False) - GLib.timeout_add( - self.main_revealer.get_transition_duration(), - self._destroy_container, - ) - return - new_index = i if i == self.current_index: new_index = max(0, i - 1) @@ -1345,8 +1336,13 @@ def on_notification_closed(self, notification, reason): new_index = len(self.notifications) - 1 self.current_index = new_index - - if len(self.notifications) > 0: + + if not self.notifications: + self._is_destroying = True + self.main_revealer.set_reveal_child(False) + self._destroy_container() + return + else: self.stack.set_visible_child(self.notifications[self.current_index]) self.update_navigation_buttons()