mirror of
https://github.com/pdxlocations/contact.git
synced 2026-08-06 08:53:29 +02:00
white stamps and no seconds
This commit is contained in:
+1
-1
@@ -116,7 +116,7 @@ def load_messages_from_db():
|
||||
# Add messages to globals.all_messages grouped by hourly timestamp
|
||||
hourly_messages = {}
|
||||
for user_id, message, timestamp, ack_type in db_messages:
|
||||
hour = datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:00:00')
|
||||
hour = datetime.fromtimestamp(timestamp).strftime('%Y-%m-%d %H:00')
|
||||
if hour not in hourly_messages:
|
||||
hourly_messages[hour] = []
|
||||
|
||||
|
||||
+1
-1
@@ -100,7 +100,7 @@ def draw_messages_window(scroll_to_bottom = False):
|
||||
messages_pad.resize(msg_line_count, messages_box.getmaxyx()[1])
|
||||
|
||||
for line in wrapped_lines:
|
||||
color = curses.color_pair(4) if prefix.startswith("--") else (curses.color_pair(3) if prefix.startswith(globals.sent_message_prefix) else curses.color_pair(2))
|
||||
color = curses.color_pair(1) if prefix.startswith("--") else (curses.color_pair(3) if prefix.startswith(globals.sent_message_prefix) else curses.color_pair(2))
|
||||
messages_pad.addstr(row, 1, line, color)
|
||||
row += 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user