Skip to content

Commit 4820391

Browse files
committed
Removed separators
1 parent 2f1d21a commit 4820391

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

modules/notifications.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,6 @@ def clear_history(self, *args):
458458
except Exception as e:
459459
logger.error(f"Error deleting persistent history file: {e}")
460460
self.persistent_notifications = []
461-
self.update_separators()
462461
self.update_no_notifications_label_visibility()
463462

464463
def _load_persistent_history(self):
@@ -497,7 +496,6 @@ def delete_historical_notification(self, note_id, container):
497496
]
498497
self._save_persistent_history()
499498
container.destroy()
500-
GLib.idle_add(self.update_separators)
501499
self.update_no_notifications_label_visibility()
502500

503501
def _add_historical_notification(self, note):
@@ -618,21 +616,11 @@ def compute_time_label(arrival_time):
618616
],
619617
)
620618
container.add(content_box)
621-
container.add(Box(name="notification-separator"))
622619
self.notifications_list.pack_start(container, False, False, 0)
623620
self.notifications_list.reorder_child(container, 0)
624-
self.update_separators()
625621
self.show_all()
626622
self.update_no_notifications_label_visibility()
627623

628-
def update_last_separator(self):
629-
children = self.notifications_list.get_children()
630-
for child in children:
631-
separator = [c for c in child.get_children() if c.get_name() == "notification-separator"]
632-
if separator:
633-
separator[0].set_visible(child != children[-1])
634-
635-
636624
def add_notification(self, notification_box):
637625
if len(self.notifications_list.get_children()) >= 50:
638626
oldest_notification_container = self.notifications_list.get_children()[-1]
@@ -652,7 +640,6 @@ def on_container_destroy(container):
652640
if hasattr(container, "notification_box"):
653641
notif_box = container.notification_box
654642
container.destroy()
655-
GLib.idle_add(self.update_separators)
656643
self.update_no_notifications_label_visibility()
657644

658645
container = Box(
@@ -751,10 +738,8 @@ def compute_time_label(arrival_time):
751738
lambda *_: on_container_destroy(container)
752739
)
753740
container.add(hist_box)
754-
container.add(Box(name="notification-separator"))
755741
self.notifications_list.pack_start(container, False, False, 0)
756742
self.notifications_list.reorder_child(container, 0)
757-
self.update_separators()
758743
self.show_all()
759744
self._append_persistent_notification(notification_box, container.arrival_time)
760745
self.update_no_notifications_label_visibility()
@@ -807,18 +792,6 @@ def _cleanup_orphan_cached_images(self):
807792
else:
808793
logger.info("Orphan cached image cleanup finished. No orphan images found.")
809794

810-
811-
def update_separators(self):
812-
children = self.notifications_list.get_children()
813-
for child in children:
814-
for widget in child.get_children():
815-
if widget.get_name() == "notification-separator":
816-
child.remove(widget)
817-
for i, child in enumerate(children):
818-
if i < len(children) - 1:
819-
separator = Box(name="notification-separator")
820-
child.add(separator)
821-
822795
def update_no_notifications_label_visibility(self):
823796
"""Updates the visibility of the 'No notifications!' label based on history."""
824797
has_notifications = bool(self.notifications_list.get_children())

0 commit comments

Comments
 (0)