mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-03 17:51:20 +00:00
parent
87bf57b1f1
commit
c852b358c9
1 changed files with 1 additions and 1 deletions
|
@ -130,7 +130,7 @@ impl CommunityView {
|
||||||
SortType::New => query = query.order_by(published.desc()).filter(user_id.is_null()),
|
SortType::New => query = query.order_by(published.desc()).filter(user_id.is_null()),
|
||||||
SortType::TopAll => {
|
SortType::TopAll => {
|
||||||
match from_user_id {
|
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())
|
None => query = query.order_by(number_of_subscribers.desc()).filter(user_id.is_null())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue