summaryrefslogtreecommitdiffstats
path: root/server/src/db/community_view.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/db/community_view.rs')
-rw-r--r--server/src/db/community_view.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/db/community_view.rs b/server/src/db/community_view.rs
index ec77cc8f..d0dca738 100644
--- a/server/src/db/community_view.rs
+++ b/server/src/db/community_view.rs
@@ -125,7 +125,9 @@ impl CommunityView {
// The view lets you pass a null user_id, if you're not logged in
match sort {
- SortType::Hot => query = query.order_by(hot_rank.desc()).filter(user_id.is_null()),
+ SortType::Hot => query = query.order_by(hot_rank.desc())
+ .then_order_by(published.desc())
+ .filter(user_id.is_null()),
SortType::New => query = query.order_by(published.desc()).filter(user_id.is_null()),
SortType::TopAll => {
match from_user_id {