Fix not clearing notifications

This commit is contained in:
Russell Schmidt
2025-01-23 12:29:32 -06:00
parent 695b4949c0
commit 8895784503
+6 -1
View File
@@ -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))