mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-05 06:00:31 +00:00
Fixing trending sorting.
This commit is contained in:
parent
38fb49edd2
commit
b157e59a4d
@ -23,3 +23,5 @@ strum_macros = "0.14.0"
|
|||||||
jsonwebtoken = "*"
|
jsonwebtoken = "*"
|
||||||
regex = "*"
|
regex = "*"
|
||||||
lazy_static = "*"
|
lazy_static = "*"
|
||||||
|
reqwest = "*"
|
||||||
|
openssl = { version = "0.10", features = ["vendored"] }
|
||||||
|
@ -125,7 +125,9 @@ impl CommunityView {
|
|||||||
|
|
||||||
// The view lets you pass a null user_id, if you're not logged in
|
// The view lets you pass a null user_id, if you're not logged in
|
||||||
match sort {
|
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::New => query = query.order_by(published.desc()).filter(user_id.is_null()),
|
||||||
SortType::TopAll => {
|
SortType::TopAll => {
|
||||||
match from_user_id {
|
match from_user_id {
|
||||||
|
Loading…
Reference in New Issue
Block a user