diff --git a/.nanpa/smile-envoy-void.kdl b/.nanpa/smile-envoy-void.kdl new file mode 100644 index 0000000..a70dedd --- /dev/null +++ b/.nanpa/smile-envoy-void.kdl @@ -0,0 +1 @@ +patch type="fixed" "sort global feels by creation time" diff --git a/ttbp/ttbp.go b/ttbp/ttbp.go index d4741ec..c7e88bc 100644 --- a/ttbp/ttbp.go +++ b/ttbp/ttbp.go @@ -202,10 +202,10 @@ func GetPostsForUser(user string) (posts []Post) { } // SortUsersByRecent sorts posts, putting the posts that were most recently -// edited first in the list. +// created first in the list. it used to be recently edited why'd i do that func SortPostsByRecent(posts []Post) []Post { sort.Slice(posts, func(i, j int) bool { - return posts[i].LastEdited.After(posts[j].LastEdited) + return posts[i].Date.After(posts[j].Date) }) return posts }