From 34a888ca10ef42a33f14c04419761592f9268ac3 Mon Sep 17 00:00:00 2001 From: Fosco Marotto Date: Thu, 4 Feb 2021 12:37:01 -0500 Subject: [PATCH] Change weighting for top_order --- app/lib/sorting_query_builder.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/lib/sorting_query_builder.rb b/app/lib/sorting_query_builder.rb index bcc7c23e..eba70d73 100644 --- a/app/lib/sorting_query_builder.rb +++ b/app/lib/sorting_query_builder.rb @@ -28,7 +28,7 @@ class SortingQueryBuilder < BaseService date_limit = 1.year.ago 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 = [ 'hot', 'newest', @@ -70,7 +70,7 @@ class SortingQueryBuilder < BaseService and s.reblog_of_id is null " if sort_type != 'newest' 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 query += " order by s.created_at desc "