try pulling self reply up in thread

This commit is contained in:
Ted Unangst 2023-06-13 23:42:09 -04:00
parent 7cc2e6f2da
commit 20a6d2b962
1 changed files with 3 additions and 0 deletions

3
web.go
View File

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