From 20a6d2b962ff14ea210c133c449dbc2dcc9d2473 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 13 Jun 2023 23:42:09 -0400 Subject: [PATCH] try pulling self reply up in thread --- web.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web.go b/web.go index 78cecee..307e2cb 100644 --- a/web.go +++ b/web.go @@ -1043,6 +1043,9 @@ func threadsort(honks []*Honk) []*Honk { } p.Style += fmt.Sprintf(" level%d", level) childs := kids[p.XID] + sort.SliceStable(childs, func(i, j int) bool { + return childs[i].Honker == p.Honker && childs[j].Honker != p.Honker + }) for _, h := range childs { done[h] = true thread = append(thread, h)