From 17be6564eefff19b2118b52c56157e126900bf69 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Tue, 13 Jun 2023 19:48:22 -0400 Subject: [PATCH] simplify --- web.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/web.go b/web.go index 410c9e0..d0c8a7a 100644 --- a/web.go +++ b/web.go @@ -1034,20 +1034,14 @@ func threadsort(honks []*Honk) []*Honk { var nextlevel func(p *Honk) level := 0 nextlevel = func(p *Honk) { - levelup := true + levelup := level < 4 if pp := honkx[p.RID]; pp != nil && p.Honker == pp.Honker { levelup = false - } else { - ilog.Printf("levelup %s", p.XID) } if levelup { level++ } - if level > 4 { - p.Style += fmt.Sprintf(" level%d", 4) - } else { - p.Style += fmt.Sprintf(" level%d", level) - } + p.Style += fmt.Sprintf(" level%d", level) childs := kids[p.XID] sort.Slice(childs, func(i, j int) bool { return childs[i].Date.Before(childs[j].Date)