kopia lustrzana https://github.com/jointakahe/takahe
Allow to set default reply visibility (#531)
rodzic
1b9cf24d09
commit
56da914340
|
@ -123,7 +123,9 @@ class Compose(FormView):
|
||||||
if self.reply_to:
|
if self.reply_to:
|
||||||
initial["reply_to"] = self.reply_to.pk
|
initial["reply_to"] = self.reply_to.pk
|
||||||
if self.reply_to.visibility == Post.Visibilities.public:
|
if self.reply_to.visibility == Post.Visibilities.public:
|
||||||
initial["visibility"] = Post.Visibilities.unlisted
|
initial[
|
||||||
|
"visibility"
|
||||||
|
] = self.request.identity.config_identity.default_reply_visibility
|
||||||
else:
|
else:
|
||||||
initial["visibility"] = self.reply_to.visibility
|
initial["visibility"] = self.reply_to.visibility
|
||||||
initial["content_warning"] = self.reply_to.summary
|
initial["content_warning"] = self.reply_to.summary
|
||||||
|
|
|
@ -246,6 +246,7 @@ class Config(models.Model):
|
||||||
|
|
||||||
toot_mode: bool = False
|
toot_mode: bool = False
|
||||||
default_post_visibility: int = 0 # Post.Visibilities.public
|
default_post_visibility: int = 0 # Post.Visibilities.public
|
||||||
|
default_reply_visibility: int = 1 # Post.Visibilities.unlisted
|
||||||
visible_follows: bool = True
|
visible_follows: bool = True
|
||||||
light_theme: bool = False
|
light_theme: bool = False
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,11 @@ class InterfacePage(SettingsPage):
|
||||||
"help_text": "Visibility to use as default for new posts.",
|
"help_text": "Visibility to use as default for new posts.",
|
||||||
"choices": Post.Visibilities.choices,
|
"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": {
|
"visible_reaction_counts": {
|
||||||
"title": "Show Boost and Like Counts",
|
"title": "Show Boost and Like Counts",
|
||||||
"help_text": "Disable to hide the number of Likes and Boosts on a 'Post'",
|
"help_text": "Disable to hide the number of Likes and Boosts on a 'Post'",
|
||||||
|
@ -40,7 +45,7 @@ class InterfacePage(SettingsPage):
|
||||||
}
|
}
|
||||||
|
|
||||||
layout = {
|
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"],
|
"Wellness": ["infinite_scroll", "visible_reaction_counts", "expand_linked_cws"],
|
||||||
"Appearance": ["light_theme", "custom_css"],
|
"Appearance": ["light_theme", "custom_css"],
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue