another try at flattening logic
Ted Unangst tedu@tedunangst.com
Tue, 13 Jun 2023 19:26:35 -0400
1 files changed,
4 insertions(+),
1 deletions(-)
jump to
M
web.go
→
web.go
@@ -1023,6 +1023,9 @@ honkx := make(map[string]*Honk)
kids := make(map[string][]*Honk) for _, h := range honks { honkx[h.XID] = h + if h.RID == "" { + honkx[""] = h + } rid := h.RID kids[rid] = append(kids[rid], h) }@@ -1037,7 +1040,7 @@ } else {
p.Style += fmt.Sprintf(" level%d", level) } levelup := true - if pp := honkx[p.RID]; pp == nil || p.Honker == pp.Honker { + if pp := honkx[p.RID]; pp != nil && p.Honker == pp.Honker { levelup = false } if levelup {