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))