retronews

a featureful fork of the luke8086/retronews hn+lobste.rs tui
Log | Files | Refs | README | LICENSE

commit 1b94a345ed726cd40ca90bc0fccc274e24cf7063
parent 09f366a7c8a5dbab36d02692b88a305df6404cd9
Author: luke8086 <55237178+luke8086@users.noreply.github.com>
Date:   Sat, 30 Jul 2022 20:05:21 +0000

Don't hide subject on selected messages

Diffstat:
Mretronews.py | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/retronews.py b/retronews.py @@ -667,7 +667,8 @@ def app_render_index_row(app: AppState, row: int, message: Message) -> None: author = message.author[:10].ljust(10) is_response = message.title.startswith("Re:") and not msg_is_thread(message) - hide_title = is_response and row > app.layout.index_start and not message.flags.starred + is_selected = message == app.selected_message + hide_title = is_response and row > app.layout.index_start and not message.flags.starred and not is_selected title = "" if hide_title else message.title unread = ( @@ -678,7 +679,7 @@ def app_render_index_row(app: AppState, row: int, message: Message) -> None: app.screen.insstr(row, 0, f"[{date}] [{author}] [{unread}] {message.index_tree}{title}") - if message == app.selected_message: + if is_selected: app.screen.chgat(row, 0, cols, app.colors.cursor) else: is_read = msg_is_read(message)