1
0
mirror of https://github.com/ihabunek/toot synced 2024-12-24 08:00:39 +01:00

Add reply, reblog and favourite counters

This commit is contained in:
Ivan Habunek 2019-08-27 15:08:40 +02:00
parent db76b004cf
commit 672bb5d008
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95

View File

@ -171,6 +171,13 @@ class StatusDetails(urwid.Pile):
yield ("pack", urwid.Divider()) yield ("pack", urwid.Divider())
yield ("pack", self.build_linebox(self.card_generator(card))) yield ("pack", self.build_linebox(self.card_generator(card)))
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"])),
]))
# Push things to bottom # Push things to bottom
yield ("weight", 1, urwid.SolidFill(" ")) yield ("weight", 1, urwid.SolidFill(" "))
yield ("pack", urwid.Text([ yield ("pack", urwid.Text([