From 064cab1988a3d1144ace4fc9674c9f7b0277ef96 Mon Sep 17 00:00:00 2001 From: Lim Ding Wen Date: Thu, 22 Dec 2022 07:30:29 +0800 Subject: [PATCH] Show visibility in TUI --- toot/tui/timeline.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/toot/tui/timeline.py b/toot/tui/timeline.py index 120feba..25559b8 100644 --- a/toot/tui/timeline.py +++ b/toot/tui/timeline.py @@ -313,11 +313,19 @@ class StatusDetails(urwid.Pile): 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 ""), ]))