mirror of
https://github.com/ihabunek/toot
synced 2025-01-11 17:13:58 +01:00
Timeline ui support + signal for [A]ccount feature
[A] displays overlay with account details and actions
This commit is contained in:
parent
5ae6db8689
commit
7be30302dc
@ -21,6 +21,7 @@ class Timeline(urwid.Columns):
|
|||||||
Displays a list of statuses to the left, and status details on the right.
|
Displays a list of statuses to the left, and status details on the right.
|
||||||
"""
|
"""
|
||||||
signals = [
|
signals = [
|
||||||
|
"account", # Display account info and actions
|
||||||
"close", # Close thread
|
"close", # Close thread
|
||||||
"compose", # Compose a new toot
|
"compose", # Compose a new toot
|
||||||
"delete", # Delete own status
|
"delete", # Delete own status
|
||||||
@ -102,6 +103,7 @@ class Timeline(urwid.Columns):
|
|||||||
return None
|
return None
|
||||||
|
|
||||||
options = [
|
options = [
|
||||||
|
"[A]ccount" if not status.is_mine else "",
|
||||||
"[B]oost",
|
"[B]oost",
|
||||||
"[D]elete" if status.is_mine else "",
|
"[D]elete" if status.is_mine else "",
|
||||||
"B[o]okmark",
|
"B[o]okmark",
|
||||||
@ -169,6 +171,10 @@ class Timeline(urwid.Columns):
|
|||||||
if index >= count:
|
if index >= count:
|
||||||
self._emit("next")
|
self._emit("next")
|
||||||
|
|
||||||
|
if key in ("a", "A"):
|
||||||
|
self._emit("account", status.data['account']['id'])
|
||||||
|
return
|
||||||
|
|
||||||
if key in ("b", "B"):
|
if key in ("b", "B"):
|
||||||
self._emit("reblog", status)
|
self._emit("reblog", status)
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user