From 25d5f67128fef1e0cd337b39dc0d5c3af03af597 Mon Sep 17 00:00:00 2001 From: Hendrik L Date: Wed, 4 Dec 2024 14:48:18 +0100 Subject: [PATCH] remove unused community.show_home setting --- app/admin/forms.py | 1 - app/admin/routes.py | 2 -- app/models.py | 2 +- app/templates/admin/communities.html | 2 -- app/templates/admin/edit_community.html | 1 - 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/admin/forms.py b/app/admin/forms.py index d23943a8..8e7a1e75 100644 --- a/app/admin/forms.py +++ b/app/admin/forms.py @@ -75,7 +75,6 @@ class EditCommunityForm(FlaskForm): local_only = BooleanField(_l('Only accept posts from current instance')) restricted_to_mods = BooleanField(_l('Only moderators can post')) new_mods_wanted = BooleanField(_l('New moderators wanted')) - show_home = BooleanField(_l('Posts show on home page')) show_popular = BooleanField(_l('Posts can be popular')) show_all = BooleanField(_l('Posts show in All list')) low_quality = BooleanField(_l("Low quality / toxic - upvotes in here don't add to reputation")) diff --git a/app/admin/routes.py b/app/admin/routes.py index 36497d22..973e52e9 100644 --- a/app/admin/routes.py +++ b/app/admin/routes.py @@ -683,7 +683,6 @@ def admin_community_edit(community_id): community.local_only = form.local_only.data community.restricted_to_mods = form.restricted_to_mods.data community.new_mods_wanted = form.new_mods_wanted.data - community.show_home = form.show_home.data community.show_popular = form.show_popular.data community.show_all = form.show_all.data community.low_quality = form.low_quality.data @@ -740,7 +739,6 @@ def admin_community_edit(community_id): form.local_only.data = community.local_only form.new_mods_wanted.data = community.new_mods_wanted form.restricted_to_mods.data = community.restricted_to_mods - form.show_home.data = community.show_home form.show_popular.data = community.show_popular form.show_all.data = community.show_all form.low_quality.data = community.low_quality diff --git a/app/models.py b/app/models.py index 14278d96..82cd2465 100644 --- a/app/models.py +++ b/app/models.py @@ -456,7 +456,7 @@ class Community(db.Model): private_mods = db.Column(db.Boolean, default=False) # Which feeds posts from this community show up in - show_home = db.Column(db.Boolean, default=False) # For anonymous users. When logged in, the home feed shows posts from subscribed communities + show_home = db.Column(db.Boolean, default=False) # unused show_popular = db.Column(db.Boolean, default=True) show_all = db.Column(db.Boolean, default=True) diff --git a/app/templates/admin/communities.html b/app/templates/admin/communities.html index eb70f955..d90f1f00 100644 --- a/app/templates/admin/communities.html +++ b/app/templates/admin/communities.html @@ -23,7 +23,6 @@ # Posts Retention Layout - Home Popular All Warning @@ -37,7 +36,6 @@ {{ community.post_count }} {{ community.content_retention if community.content_retention != -1 }} {{ community.default_layout if community.default_layout }} - {{ '✓'|safe if community.show_home else '✗'|safe }} {{ '✓'|safe if community.show_popular else '✗'|safe }} {{ '✓'|safe if community.show_all else '✗'|safe }} {{ '⚠'|safe if community.nsfw or community.nsfl or community.content_warning else ''|safe }} diff --git a/app/templates/admin/edit_community.html b/app/templates/admin/edit_community.html index 297a04b1..a1ce4b71 100644 --- a/app/templates/admin/edit_community.html +++ b/app/templates/admin/edit_community.html @@ -41,7 +41,6 @@ {{ render_field(form.banned) }} {{ render_field(form.local_only) }} {{ render_field(form.new_mods_wanted) }} - {{ render_field(form.show_home) }} {{ render_field(form.show_popular) }} {{ render_field(form.show_all) }} {{ render_field(form.low_quality) }}