Fix explore page.

This commit is contained in:
Fosco Marotto 2021-02-03 11:32:25 -05:00
parent 7d8ecac125
commit 4e0605165d

View File

@ -111,8 +111,6 @@ class SortingQueryBuilder < BaseService
query = query.where('status_stats.replies_count > ?', min_replies) unless sort_type == 'recent' query = query.where('status_stats.replies_count > ?', min_replies) unless sort_type == 'recent'
query = query.where('status_stats.reblogs_count > ?', min_reblogs) unless sort_type == 'recent' query = query.where('status_stats.reblogs_count > ?', min_reblogs) unless sort_type == 'recent'
query = query.where('status_stats.favourites_count > ?', min_likes) unless sort_type == 'recent' query = query.where('status_stats.favourites_count > ?', min_likes) unless sort_type == 'recent'
query = query.joins(:account)
query = query.where('accounts.is_flagged_as_spam is false')
query = query.joins(:status) query = query.joins(:status)
query = query.where('statuses.reblog_of_id IS NULL') query = query.where('statuses.reblog_of_id IS NULL')
query = query.where('statuses.in_reply_to_id IS NULL') query = query.where('statuses.in_reply_to_id IS NULL')