mirror of
https://github.com/pdxlocations/contact.git
synced 2026-08-08 18:02:56 +02:00
Count total lines of messages
This commit is contained in:
+3
-1
@@ -93,11 +93,14 @@ def draw_messages_window():
|
||||
if channel in globals.all_messages:
|
||||
messages = globals.all_messages[channel]
|
||||
|
||||
msg_lines = 0
|
||||
|
||||
# Display messages starting from the calculated start index
|
||||
row = 0
|
||||
for (prefix, message) in messages:
|
||||
full_message = f"{prefix}{message}"
|
||||
wrapped_lines = textwrap.wrap(full_message, messages_box.getmaxyx()[1] - 2)
|
||||
msg_lines += len(wrapped_lines)
|
||||
|
||||
for line in wrapped_lines:
|
||||
# Highlight the row if it's the selected message
|
||||
@@ -134,7 +137,6 @@ def draw_node_list():
|
||||
nodes_win.box()
|
||||
nodes_win.refresh()
|
||||
|
||||
|
||||
def select_channels(direction):
|
||||
channel_list_length = len(globals.channel_list)
|
||||
globals.selected_channel += direction
|
||||
|
||||
Reference in New Issue
Block a user