From 6be05df143d861ceeb4d4ea870ea6152fcb7cd36 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Fri, 15 May 2020 00:18:50 -0400 Subject: [PATCH] load donks for chonks --- database.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/database.go b/database.go index 4434c40..3ad28e5 100644 --- a/database.go +++ b/database.go @@ -546,6 +546,7 @@ func loadchatter(userid int64) map[string][]*Chonk { } defer rows.Close() chonks := make(map[string][]*Chonk) + var allchonks []*Chonk for rows.Next() { ch := new(Chonk) var dt string @@ -556,7 +557,9 @@ func loadchatter(userid int64) map[string][]*Chonk { } ch.Date, _ = time.Parse(dbtimeformat, dt) chonks[ch.Target] = append(chonks[ch.Target], ch) + allchonks = append(allchonks, ch) } + donksforchonks(allchonks) return chonks }