sometimes a thread gets weird. don't double process trees.

This commit is contained in:
Ted Unangst 2023-06-18 21:22:21 -04:00
parent c5ab532e64
commit cd7518c0a5
1 changed files with 6 additions and 4 deletions

10
web.go
View File

@ -1052,16 +1052,18 @@ func threadsort(honks []*Honk) []*Honk {
return childs[i].Honker == p.Honker && childs[j].Honker != p.Honker return childs[i].Honker == p.Honker && childs[j].Honker != p.Honker
}) })
for _, h := range childs { for _, h := range childs {
done[h] = true if !done[h] {
thread = append(thread, h) done[h] = true
nextlevel(h) thread = append(thread, h)
nextlevel(h)
}
} }
if levelup { if levelup {
level-- level--
} }
} }
for _, h := range honks { for _, h := range honks {
if h.RID == "" { if !done[h] && h.RID == "" {
done[h] = true done[h] = true
thread = append(thread, h) thread = append(thread, h)
nextlevel(h) nextlevel(h)