[sorting query builder] Adjust filtering

This commit is contained in:
Fosco Marotto
2021-01-21 17:37:12 -05:00
parent 5b4b633702
commit 852d2f78e9
4 changed files with 13 additions and 8 deletions

View File

@@ -44,9 +44,10 @@ class Api::V1::Timelines::ExploreController < Api::BaseController
def explore_statuses
if current_account
SortingQueryBuilder.new.call(@sort_type, nil, params[:page]).reject {|status|
FeedManager.instance.filter?(:home, status, current_account.id)
}
SortingQueryBuilder.new.call(@sort_type, nil, params[:page], current_account)
.reject {|status|
FeedManager.instance.filter?(:home, status, current_account.id)
}
else
page = [params[:page].to_i.abs, MIN_UNAUTHENTICATED_PAGES].min
SortingQueryBuilder.new.call(@sort_type, nil, page)