don't sort by date, causes unpredictable insertions with new arrivals.
Ted Unangst tedu@tedunangst.com
Fri, 03 May 2019 17:30:44 -0400
1 files changed,
0 insertions(+),
10 deletions(-)
jump to
M
honk.go
→
honk.go
@@ -115,9 +115,6 @@ templinfo["HonkCSRF"] = login.GetCSRF("honkhonk", r)
} else { honks = getpublichonks() } - sort.Slice(honks, func(i, j int) bool { - return honks[i].Date.After(honks[j].Date) - }) var modtime time.Time if len(honks) > 0 {@@ -161,9 +158,6 @@ honks = gethonksbyuser(name)
} else { honks = getpublichonks() } - sort.Slice(honks, func(i, j int) bool { - return honks[i].Date.After(honks[j].Date) - }) reverbolate(honks) home := fmt.Sprintf("https://%s/", serverName)@@ -183,11 +177,7 @@ Link: home,
}, } var modtime time.Time - past := time.Now().UTC().Add(-3 * 24 * time.Hour) for _, honk := range honks { - if honk.Date.Before(past) { - break - } desc := string(honk.HTML) for _, d := range honk.Donks { desc += fmt.Sprintf(`<p><a href="%sd/%s">Attachment: %s</a>`,