sort global by created, not updated

This commit is contained in:
nbsp 2026-01-08 01:20:08 +01:00
parent e0e7ebfa28
commit 5437b6cf09
2 changed files with 3 additions and 2 deletions

View File

@ -0,0 +1 @@
patch type="fixed" "sort global feels by creation time"

View File

@ -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
}