From 50efa509234a8790ed68de2c2dedd98f29827121 Mon Sep 17 00:00:00 2001 From: pdxlocations Date: Sat, 17 May 2025 23:27:19 -0700 Subject: [PATCH] working changes --- contact/ui/contact_ui.py | 16 ++++++++++++++-- contact/ui/nav_utils.py | 5 +++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/contact/ui/contact_ui.py b/contact/ui/contact_ui.py index e3587d4..57fdcff 100644 --- a/contact/ui/contact_ui.py +++ b/contact/ui/contact_ui.py @@ -515,7 +515,13 @@ def draw_messages_window(scroll_to_bottom: bool = False) -> None: else: ui_state.selected_message = max(min(ui_state.selected_message, msg_line_count - visible_lines), 0) - draw_main_arrows(messages_win, msg_line_count, ui_state.start_index, 1, window=messages_win) + draw_main_arrows( + messages_win, + msg_line_count, + ui_state.start_index, + 1, + log_height=packetlog_win.getmaxyx()[0], + ) messages_win.refresh() refresh_pad(1) @@ -624,7 +630,13 @@ def scroll_messages(direction: int) -> None: 0, min(ui_state.start_index[ui_state.current_window], max_index - visible_height + 1) ) - draw_main_arrows(messages_win, msg_line_count, ui_state.start_index, ui_state.current_window, window=messages_win) + draw_main_arrows( + messages_win, + msg_line_count, + ui_state.start_index, + ui_state.current_window, + log_height=packetlog_win.getmaxyx()[0], + ) messages_win.refresh() refresh_pad(1) diff --git a/contact/ui/nav_utils.py b/contact/ui/nav_utils.py index e6a076b..4573aa0 100644 --- a/contact/ui/nav_utils.py +++ b/contact/ui/nav_utils.py @@ -394,8 +394,9 @@ def draw_main_arrows(win: object, max_index: int, start_index: List[int], curren if current_window == 1: pass - # if (packetlog_win := kwargs.get("window")) and ui_state.current_window == 1: - # usable_height -= packetlog_win.getmaxyx()[0] - 1 if ui_state.display_log else 0 + if current_window == 1 and ui_state.display_log: + if log_height := kwargs.get("log_height"): + usable_height -= log_height - 1 if usable_height < max_index: if start_index[current_window] > 0: