From d81eaaad0da59baca7daf5a993eb16f198247273 Mon Sep 17 00:00:00 2001 From: rogarb Date: Sun, 5 Mar 2023 09:44:10 +0100 Subject: [PATCH] Inherit visibility when replying in TUI When replying to a toot, the visibility gets set to default: if the toot has a direct visibility, the visibility in reply will be changed to the default one, whereas it should stay in direct mode. --- toot/tui/compose.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/toot/tui/compose.py b/toot/tui/compose.py index 4b31c0f..74b915d 100644 --- a/toot/tui/compose.py +++ b/toot/tui/compose.py @@ -33,7 +33,9 @@ class StatusComposer(urwid.Frame): self.cw_remove_button = Button("Remove content warning", on_press=self.remove_content_warning) - self.visibility = get_default_visibility() + self.visibility = ( + in_reply_to.visibility if in_reply_to else get_default_visibility() + ) self.visibility_button = Button("Visibility: {}".format(self.visibility), on_press=self.choose_visibility)