Skip to content

Commit

Permalink
Show visibility in TUI
Browse files Browse the repository at this point in the history
  • Loading branch information
limdingwen authored and ihabunek committed Dec 28, 2022
1 parent 8ffe8d2 commit 064cab1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions toot/tui/timeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,19 @@ def content_generator(self, status, reblogged_by):
else None
)

visibility_colors = {
"public": "gray",
"unlisted": "white",
"private": "cyan",
"direct": "yellow"
}

yield ("pack", urwid.Text([
("red", "🠷 ") if status.bookmarked else "",
("gray", f"⤶ {status.data['replies_count']} "),
("yellow" if status.reblogged else "gray", f"♺ {status.data['reblogs_count']} "),
("yellow" if status.favourited else "gray", f"★ {status.data['favourites_count']}"),
(visibility_colors[status.visibility], f" · {status.visibility}"),
("yellow", f" · Translated from {translated_from} ") if translated_from else "",
("gray", f" · {application}" if application else ""),
]))
Expand Down

0 comments on commit 064cab1

Please sign in to comment.