Browse Source

simplify collapsed calculation

Signed-off-by: William Casarin <jb55@jb55.com>
profiles-everywhere
William Casarin 3 years ago
parent
commit
fd4aa2bb3d
  1. 9
      damus/Views/EventDetailView.swift

9
damus/Views/EventDetailView.swift

@ -318,14 +318,7 @@ func calculated_collapsed_events(collapsed: Bool, active: NostrEvent, events: [N
start = 1
}
count += 1
case .main:
if count != 0 {
let c = CollapsedEvents(count: count, start: start, end: i)
acc.append(.collapsed(c))
start = i
count = 0
}
acc.append(.event(ev, .main))
case .main: fallthrough
case .reply:
if count != 0 {
let c = CollapsedEvents(count: count, start: start, end: i)

Loading…
Cancel
Save