From 7be30302dcc4ec7b1193a365a398d885289b6dcf Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Thu, 2 Feb 2023 20:37:12 -0500 Subject: [PATCH] Timeline ui support + signal for [A]ccount feature [A] displays overlay with account details and actions --- toot/tui/timeline.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/toot/tui/timeline.py b/toot/tui/timeline.py index d4b9b74..d91fe3a 100644 --- a/toot/tui/timeline.py +++ b/toot/tui/timeline.py @@ -21,6 +21,7 @@ class Timeline(urwid.Columns): Displays a list of statuses to the left, and status details on the right. """ signals = [ + "account", # Display account info and actions "close", # Close thread "compose", # Compose a new toot "delete", # Delete own status @@ -102,6 +103,7 @@ class Timeline(urwid.Columns): return None options = [ + "[A]ccount" if not status.is_mine else "", "[B]oost", "[D]elete" if status.is_mine else "", "B[o]okmark", @@ -169,6 +171,10 @@ class Timeline(urwid.Columns): if index >= count: self._emit("next") + if key in ("a", "A"): + self._emit("account", status.data['account']['id']) + return + if key in ("b", "B"): self._emit("reblog", status) return