From: Dessalines Date: Thu, 18 Apr 2019 15:03:08 +0000 (-0700) Subject: Fixing community sort. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%24%7B%60data:application/%22https:/hacktivis.me/%7Blink%7D?a=commitdiff_plain;h=fdf547354f225621763fdc46c9b099ed05789271;p=lemmy.git Fixing community sort. Fixes #71 --- diff --git a/server/src/actions/community_view.rs b/server/src/actions/community_view.rs index a754c2e8..4db97491 100644 --- a/server/src/actions/community_view.rs +++ b/server/src/actions/community_view.rs @@ -130,7 +130,7 @@ impl CommunityView { SortType::New => query = query.order_by(published.desc()).filter(user_id.is_null()), SortType::TopAll => { match from_user_id { - Some(from_user_id) => query = query.filter(user_id.eq(from_user_id)).order_by((subscribed.desc(), number_of_subscribers.desc())), + Some(from_user_id) => query = query.filter(user_id.eq(from_user_id)).order_by((subscribed.asc(), number_of_subscribers.desc())), None => query = query.order_by(number_of_subscribers.desc()).filter(user_id.is_null()) } }