Change weighting for top_order

This commit is contained in:
Fosco Marotto 2021-02-04 12:37:01 -05:00
parent b705c82304
commit 34a888ca10
1 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ class SortingQueryBuilder < BaseService
date_limit = 1.year.ago date_limit = 1.year.ago
end end
top_order = 'status_stats.favourites_count DESC, status_stats.reblogs_count DESC, status_stats.replies_count DESC' top_order = 'status_stats.replies_count DESC, status_stats.reblogs_count DESC, status_stats.favourites_count DESC'
valid_sort_types = [ valid_sort_types = [
'hot', 'hot',
'newest', 'newest',
@ -70,7 +70,7 @@ class SortingQueryBuilder < BaseService
and s.reblog_of_id is null " and s.reblog_of_id is null "
if sort_type != 'newest' if sort_type != 'newest'
query += " query += "
order by ss.favourites_count desc, ss.reblogs_count desc, ss.replies_count desc " order by ss.replies_count desc, ss.reblogs_count desc, ss.favourites_count desc "
else else
query += " query += "
order by s.created_at desc " order by s.created_at desc "