Ordering by date second.

- Fixes #175
This commit is contained in:
Dessalines 2019-06-19 16:10:05 -07:00
parent f95b9994d2
commit 8955633a3b
2 changed files with 3 additions and 2 deletions

View file

@ -94,7 +94,7 @@ impl CommentView {
}
query = match sort {
// SortType::Hot => query.order_by(hot_rank.desc()),
// SortType::Hot => query.order(hot_rank.desc(), published.desc()),
SortType::New => query.order_by(published.desc()),
SortType::TopAll => query.order_by(score.desc()),
SortType::TopYear => query

View file

@ -122,7 +122,8 @@ impl PostView {
}
query = match sort {
SortType::Hot => query.order_by(hot_rank.desc()),
SortType::Hot => query.order_by(hot_rank.desc())
.then_order_by(published.desc()),
SortType::New => query.order_by(published.desc()),
SortType::TopAll => query.order_by(score.desc()),
SortType::TopYear => query