support sort by n_attention

This commit is contained in:
2023-05-05 22:06:19 +08:00
parent bbed041253
commit 01f56ea0a6
5 changed files with 16 additions and 2 deletions

View File

@@ -216,6 +216,7 @@ impl PostListCache {
1 => -p.last_comment_time.timestamp(),
2 => (-p.hot_score).into(),
3 => rand::thread_rng().gen_range(0..i64::MAX),
4 => (-p.n_attentions).into(),
_ => panic!("wrong mode"),
},
p.id,