tui: keep CW note after opening toot

Continue to display 'Marked as sensitive' in the toot view even after
the CW has been opened.  This matches the behaviour of other clients,
and is useful to see because it might affect whether you want to boost
the toot or not (for example).
This commit is contained in:
Lexi Winter 2023-12-31 13:16:28 +00:00
parent 2e55ddbe7e
commit f394d78c1e
1 changed files with 3 additions and 0 deletions

View File

@ -340,6 +340,9 @@ class StatusDetails(urwid.Pile):
if status.data["spoiler_text"] and not status.show_sensitive:
yield ("pack", urwid.Text(("content_warning", "Marked as sensitive. Press S to view.")))
else:
if status.data["spoiler_text"]:
yield ("pack", urwid.Text(("content_warning", "Marked as sensitive.")))
content = status.original.translation if status.original.show_translation else status.data["content"]
widgetlist = html_to_widgets(content)