1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-06-16 06:15:25 +00:00

Show application used to post status

This commit is contained in:
Ivan Habunek 2019-08-31 15:05:50 +02:00
parent 7e04ad55c6
commit 05972fc6fa
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95

View File

@ -232,11 +232,15 @@ class StatusDetails(urwid.Pile):
yield ("pack", urwid.Divider())
yield ("pack", self.build_linebox(self.card_generator(card)))
application = status.data.get("application") or {}
application = application.get("name")
yield ("pack", urwid.AttrWrap(urwid.Divider("-"), "gray"))
yield ("pack", urwid.Text([
("gray", "{} ".format(status.data["replies_count"])),
("yellow" if status.reblogged else "gray", "{} ".format(status.data["reblogs_count"])),
("yellow" if status.favourited else "gray", "{}".format(status.data["favourites_count"])),
("gray", " · {}".format(application) if application else ""),
]))
# Push things to bottom