From 18821eb09b60874adc89be2974e6b39e3bf7afaa Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 3 May 2019 17:30:44 -0400 Subject: [PATCH] don't sort by date, causes unpredictable insertions with new arrivals. --- honk.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/honk.go b/honk.go index 203f4b2..4179c73 100644 --- a/honk.go +++ b/honk.go @@ -115,9 +115,6 @@ func homepage(w http.ResponseWriter, r *http.Request) { } 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 @@ func showrss(w http.ResponseWriter, r *http.Request) { } 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 @@ func showrss(w http.ResponseWriter, r *http.Request) { }, } 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(`

Attachment: %s`,