]> Untitled Git - lemmy.git/commitdiff
Fixing community sort.
authorDessalines <tyhou13@gmx.com>
Thu, 18 Apr 2019 15:03:08 +0000 (08:03 -0700)
committerDessalines <tyhou13@gmx.com>
Thu, 18 Apr 2019 15:03:08 +0000 (08:03 -0700)
Fixes #71

server/src/actions/community_view.rs

index a754c2e8280a9f2fe878a98d35175ccbdf146a08..4db97491a4bf38f21e3be84473ba4fb0956fb6d2 100644 (file)
@@ -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())
         }
       }