mirror of
https://github.com/ihabunek/toot
synced 2024-12-23 07:27:12 +01:00
Indicate if status is a reblog in timeline
This is different from the "reblogged" yellow icon already displayed on the left of account name which indicates if own status got reblogged. This one indicates if displayed status is a reblog.
This commit is contained in:
parent
e06478a798
commit
a8774fc9ea
@ -31,7 +31,7 @@ class Status:
|
|||||||
self.reblogged = data.get("reblogged", False)
|
self.reblogged = data.get("reblogged", False)
|
||||||
self.in_reply_to = data.get("in_reply_to_id")
|
self.in_reply_to = data.get("in_reply_to_id")
|
||||||
|
|
||||||
reblog = data.get("reblog")
|
self.reblog = reblog = data.get("reblog")
|
||||||
self.url = reblog.get("url") if reblog else data.get("url")
|
self.url = reblog.get("url") if reblog else data.get("url")
|
||||||
|
|
||||||
def get_author(self):
|
def get_author(self):
|
||||||
|
@ -316,6 +316,7 @@ class StatusListItem(SelectableColumns):
|
|||||||
created_at = status.created_at.strftime("%Y-%m-%d %H:%M")
|
created_at = status.created_at.strftime("%Y-%m-%d %H:%M")
|
||||||
favourited = ("yellow", "★") if status.favourited else " "
|
favourited = ("yellow", "★") if status.favourited else " "
|
||||||
reblogged = ("yellow", "♺") if status.reblogged else " "
|
reblogged = ("yellow", "♺") if status.reblogged else " "
|
||||||
|
is_reblog = ("cyan", "♺") if status.reblog else " "
|
||||||
is_reply = ("cyan", "⤶") if status.in_reply_to else " "
|
is_reply = ("cyan", "⤶") if status.in_reply_to else " "
|
||||||
|
|
||||||
return super().__init__([
|
return super().__init__([
|
||||||
@ -327,5 +328,6 @@ class StatusListItem(SelectableColumns):
|
|||||||
("pack", urwid.Text(" ")),
|
("pack", urwid.Text(" ")),
|
||||||
urwid.Text(("green", status.account), wrap="clip"),
|
urwid.Text(("green", status.account), wrap="clip"),
|
||||||
("pack", urwid.Text(is_reply)),
|
("pack", urwid.Text(is_reply)),
|
||||||
|
("pack", urwid.Text(is_reblog)),
|
||||||
("pack", urwid.Text(" ")),
|
("pack", urwid.Text(" ")),
|
||||||
])
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user