refactor notification

This commit is contained in:
pdxlocations
2025-01-22 08:20:51 -08:00
parent 7493d21c1a
commit a710374fe9
+2 -8
View File
@@ -8,18 +8,12 @@ import ui.dialog
from ui.colors import setup_colors
def add_notification(channel_number):
handle_notification(channel_number, add=True)
globals.notifications.add(channel_number)
def remove_notification(channel_number):
handle_notification(channel_number, add=False)
globals.notifications.discard(channel_number)
channel_win.box()
def handle_notification(channel_number, add=True):
if add:
globals.notifications.add(channel_number) # Add the channel to the notification tracker
else:
globals.notifications.discard(channel_number) # Remove the channel from the notification tracker
def draw_text_field(win, text):
win.border()
win.addstr(1, 1, text)