try to keep the thread flat for simple reply chains

This commit is contained in:
Ted Unangst 2023-06-14 20:40:11 -04:00
parent d86c38136f
commit 2f52375872
1 changed files with 5 additions and 0 deletions

5
web.go
View File

@ -1038,6 +1038,11 @@ func threadsort(honks []*Honk) []*Honk {
if pp := honkx[p.RID]; p.RID == "" || (pp != nil && p.Honker == pp.Honker) {
levelup = false
}
if level > 0 && len(kids[p.RID]) == 1 {
if pp := honkx[p.RID]; pp != nil && len(kids[pp.RID]) == 1 {
levelup = false
}
}
if levelup {
level++
}