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

4
web.go
View File

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