From 8895784503a0581adf561ace99eeda1cb38a4b02 Mon Sep 17 00:00:00 2001 From: Russell Schmidt Date: Thu, 23 Jan 2025 12:29:32 -0600 Subject: [PATCH] Fix not clearing notifications --- ui/curses_ui.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/curses_ui.py b/ui/curses_ui.py index 4e0328b..45fb687 100644 --- a/ui/curses_ui.py +++ b/ui/curses_ui.py @@ -12,7 +12,6 @@ def add_notification(channel_number): def remove_notification(channel_number): globals.notifications.discard(channel_number) - channel_box.box() def draw_text_field(win, text): win.border() @@ -153,6 +152,12 @@ def select_channels(direction): globals.selected_channel = 0 draw_messages_window(True) + # For now just re-draw channel list when clearing notifications, we can probably make this more efficient + if globals.selected_channel in globals.notifications: + remove_notification(globals.selected_channel) + draw_channel_list() + return + win_height, win_width = channel_box.getmaxyx() start_index = max(0, globals.selected_channel - (win_height - 3))