mirror of
https://github.com/ihabunek/toot.git
synced 2024-12-04 14:46:33 -05:00
Indicate if status is a reply in timeline of TUI
This commit is contained in:
parent
f9fb7c074a
commit
efbaf9e706
@ -36,6 +36,7 @@ class Status:
|
||||
self.author = get_author(data, instance)
|
||||
self.favourited = data.get("favourited", False)
|
||||
self.reblogged = data.get("reblogged", False)
|
||||
self.in_reply_to = data.get("in_reply_to_id")
|
||||
|
||||
def get_account(self):
|
||||
acct = self.data['account']['acct']
|
||||
|
@ -56,6 +56,7 @@ class Timeline(urwid.Columns):
|
||||
"blue": "green_selected",
|
||||
"green": "green_selected",
|
||||
"yellow": "green_selected",
|
||||
"cyan": "green_selected",
|
||||
None: "green_selected",
|
||||
})
|
||||
|
||||
@ -288,6 +289,7 @@ class StatusListItem(SelectableColumns):
|
||||
created_at = status.created_at.strftime("%Y-%m-%d %H:%M")
|
||||
favourited = ("yellow", "★") if status.favourited else " "
|
||||
reblogged = ("yellow", "♺") if status.reblogged else " "
|
||||
is_reply = ("cyan", "⤶") if status.in_reply_to else " "
|
||||
|
||||
return super().__init__([
|
||||
("pack", SelectableText(("blue", created_at), wrap="clip")),
|
||||
@ -297,4 +299,6 @@ class StatusListItem(SelectableColumns):
|
||||
("pack", urwid.Text(reblogged)),
|
||||
("pack", urwid.Text(" ")),
|
||||
urwid.Text(("green", status.account), wrap="clip"),
|
||||
("pack", urwid.Text(is_reply)),
|
||||
("pack", urwid.Text(" ")),
|
||||
])
|
||||
|
Loading…
Reference in New Issue
Block a user