fix(posts): manually sort by flags (#168)
* fix(posts): manually sort by flags * fix(posts): shorten sort call
This commit is contained in:
parent
f44638a2cb
commit
f74d1affb6
@ -424,6 +424,7 @@ impl Post {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
posts.sort_by(|a, b| b.created_ts.cmp(&a.created_ts));
|
posts.sort_by(|a, b| b.created_ts.cmp(&a.created_ts));
|
||||||
|
posts.sort_by(|a, b| b.flags.stickied.cmp(&a.flags.stickied));
|
||||||
Ok((posts, res["data"]["after"].as_str().unwrap_or_default().to_string()))
|
Ok((posts, res["data"]["after"].as_str().unwrap_or_default().to_string()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user