diff --git a/src/post.rs b/src/post.rs index 7040de3..f53dd84 100644 --- a/src/post.rs +++ b/src/post.rs @@ -155,6 +155,8 @@ async fn parse_comments(json: &serde_json::Value) -> Vec { Vec::new() }; + dbg!(); + comments.push(Comment { id: val(&comment, "id"), body, @@ -171,7 +173,11 @@ async fn parse_comments(json: &serde_json::Value) -> Vec { }, distinguished: val(&comment, "distinguished"), }, - score: format_num(score), + score: if comment["data"]["score_hidden"].as_bool().unwrap_or_default() { + "•".to_string() + } else { + format_num(score) + }, rel_time, created, replies, diff --git a/src/utils.rs b/src/utils.rs index da6ab3d..fe399e7 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -343,7 +343,11 @@ pub async fn fetch_posts(path: &str, fallback_title: String) -> Result<(Vec