From 831f9b1a47d9e3adb7c1ca1a0529cb54b88a148c Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Sat, 30 Nov 2024 13:43:44 +1300 Subject: [PATCH] improve initial impression given to new users --- app/main/routes.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/main/routes.py b/app/main/routes.py index cd093e52..73432a91 100644 --- a/app/main/routes.py +++ b/app/main/routes.py @@ -61,7 +61,7 @@ def home_page(sort, view_filter): if current_user.is_anonymous: flash(_('Create an account to tailor this feed to your interests.')) posts = Post.query.filter(Post.from_bot == False, Post.nsfw == False, Post.nsfl == False, Post.deleted == False) - content_filters = {} + content_filters = {'trump': {'trump', 'elon', 'musk'}} else: posts = Post.query.filter(Post.deleted == False) @@ -100,6 +100,8 @@ def home_page(sort, view_filter): elif view_filter == 'popular': posts = posts.join(Community, Community.id == Post.community_id) posts = posts.filter(Community.show_popular == True, Post.score > 100) + if current_user.is_anonymous: + posts = posts.filter(Community.low_quality == False) elif view_filter == 'all': posts = posts.join(Community, Community.id == Post.community_id) posts = posts.filter(Community.show_all == True)