mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-28 18:21:00 +00:00
Allow to set default reply visibility (#531)
This commit is contained in:
parent
1b9cf24d09
commit
56da914340
3 changed files with 10 additions and 2 deletions
|
@ -123,7 +123,9 @@ class Compose(FormView):
|
|||
if self.reply_to:
|
||||
initial["reply_to"] = self.reply_to.pk
|
||||
if self.reply_to.visibility == Post.Visibilities.public:
|
||||
initial["visibility"] = Post.Visibilities.unlisted
|
||||
initial[
|
||||
"visibility"
|
||||
] = self.request.identity.config_identity.default_reply_visibility
|
||||
else:
|
||||
initial["visibility"] = self.reply_to.visibility
|
||||
initial["content_warning"] = self.reply_to.summary
|
||||
|
|
|
@ -246,6 +246,7 @@ class Config(models.Model):
|
|||
|
||||
toot_mode: bool = False
|
||||
default_post_visibility: int = 0 # Post.Visibilities.public
|
||||
default_reply_visibility: int = 1 # Post.Visibilities.unlisted
|
||||
visible_follows: bool = True
|
||||
light_theme: bool = False
|
||||
|
||||
|
|
|
@ -16,6 +16,11 @@ class InterfacePage(SettingsPage):
|
|||
"help_text": "Visibility to use as default for new posts.",
|
||||
"choices": Post.Visibilities.choices,
|
||||
},
|
||||
"default_reply_visibility": {
|
||||
"title": "Default Reply Visibility",
|
||||
"help_text": "Visibility to use as default for replies.",
|
||||
"choices": Post.Visibilities.choices,
|
||||
},
|
||||
"visible_reaction_counts": {
|
||||
"title": "Show Boost and Like Counts",
|
||||
"help_text": "Disable to hide the number of Likes and Boosts on a 'Post'",
|
||||
|
@ -40,7 +45,7 @@ class InterfacePage(SettingsPage):
|
|||
}
|
||||
|
||||
layout = {
|
||||
"Posting": ["toot_mode", "default_post_visibility"],
|
||||
"Posting": ["toot_mode", "default_post_visibility", "default_reply_visibility"],
|
||||
"Wellness": ["infinite_scroll", "visible_reaction_counts", "expand_linked_cws"],
|
||||
"Appearance": ["light_theme", "custom_css"],
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue