Skip to content

Commit f74d1af

Browse files
authored
fix(posts): manually sort by flags (#168)
* fix(posts): manually sort by flags * fix(posts): shorten sort call
1 parent f44638a commit f74d1af

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ impl Post {
424424
});
425425
}
426426
posts.sort_by(|a, b| b.created_ts.cmp(&a.created_ts));
427+
posts.sort_by(|a, b| b.flags.stickied.cmp(&a.flags.stickied));
427428
Ok((posts, res["data"]["after"].as_str().unwrap_or_default().to_string()))
428429
}
429430
}

0 commit comments

Comments
 (0)