mirror of
https://codeberg.org/rimu/pyfedi
synced 2025-01-23 11:26:56 -08:00
refactor home page based on #293
local posts are those in local communities, not those posted anywhere by local accounts
This commit is contained in:
parent
56a4d60aab
commit
45c84e79d9
1 changed files with 2 additions and 1 deletions
|
@ -98,7 +98,8 @@ def home_page(sort, view_filter):
|
|||
posts = posts.join(CommunityMember, Post.community_id == CommunityMember.community_id).filter(CommunityMember.is_banned == False)
|
||||
posts = posts.filter(CommunityMember.user_id == current_user.id)
|
||||
elif view_filter == 'local':
|
||||
posts = posts.filter(Post.instance_id == 1)
|
||||
posts = posts.join(Community, Community.id == Post.community_id)
|
||||
posts = posts.filter(Community.instance_id == 1)
|
||||
elif view_filter == 'popular':
|
||||
posts = posts.join(Community, Community.id == Post.community_id)
|
||||
posts = posts.filter(Community.show_popular == True, Post.score > 100)
|
||||
|
|
Loading…
Reference in a new issue