sometimes a thread gets weird. don't double process trees.
This commit is contained in:
parent
c5ab532e64
commit
cd7518c0a5
10
web.go
10
web.go
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue