Optimized Nested Comments for Mobile, Added IDs
This commit is contained in:
@ -164,6 +164,7 @@ async fn parse_comments(json: serde_json::Value) -> Result<Vec<Comment>, &'stati
|
||||
};
|
||||
|
||||
comments.push(Comment {
|
||||
id: val(comment, "id").await,
|
||||
body: body,
|
||||
author: val(comment, "author").await,
|
||||
score: format_num(score),
|
||||
|
@ -34,6 +34,7 @@ pub struct Post {
|
||||
#[allow(dead_code)]
|
||||
// Comment with content, post, score and data/time that it was posted
|
||||
pub struct Comment {
|
||||
pub id: String,
|
||||
pub body: String,
|
||||
pub author: String,
|
||||
pub flair: Flair,
|
||||
|
Reference in New Issue
Block a user