diff --git a/server/src/db/comment_view.rs b/server/src/db/comment_view.rs index 9cd61e33e..53517db95 100644 --- a/server/src/db/comment_view.rs +++ b/server/src/db/comment_view.rs @@ -94,7 +94,7 @@ impl CommentView { } query = match sort { - // SortType::Hot => query.order_by(hot_rank.desc()), + // SortType::Hot => query.order(hot_rank.desc(), published.desc()), SortType::New => query.order_by(published.desc()), SortType::TopAll => query.order_by(score.desc()), SortType::TopYear => query diff --git a/server/src/db/post_view.rs b/server/src/db/post_view.rs index bfe730a2b..bec00b982 100644 --- a/server/src/db/post_view.rs +++ b/server/src/db/post_view.rs @@ -122,7 +122,8 @@ impl PostView { } query = match sort { - SortType::Hot => query.order_by(hot_rank.desc()), + SortType::Hot => query.order_by(hot_rank.desc()) + .then_order_by(published.desc()), SortType::New => query.order_by(published.desc()), SortType::TopAll => query.order_by(score.desc()), SortType::TopYear => query