damus

nostr ios client
git clone git://jb55.com/damus
Log | Files | Refs | LICENSE

commit 89cb0630156a1d2566ca8826f9d279701f57d734
parent c9d3ed361f4adf3ce011433b6ae9911c6e986052
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 17 Apr 2022 14:25:07 -0700

show hidden notes at the end as well

Signed-off-by: William Casarin <jb55@jb55.com>

Diffstat:
Mdamus/Views/EventDetailView.swift | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/damus/Views/EventDetailView.swift b/damus/Views/EventDetailView.swift @@ -189,6 +189,8 @@ func calculated_collapsed_events(collapsed: Bool, active: NostrEvent, events: [N } } + let nevents = events.count + var i: Int = 0 return events.reduce(into: []) { (acc, ev) in let highlight = determine_highlight(current: ev, active: active) @@ -209,6 +211,14 @@ func calculated_collapsed_events(collapsed: Bool, active: NostrEvent, events: [N acc.append(.event(ev, highlight)) } + if i == nevents-1 { + if count != 0 { + acc.append(.collapsed(count, UUID().description)) + count = 0 + } + } + + i += 1 } }