mirror of
git://jb55.com/damus
synced 2024-09-18 19:23:49 +00:00
show hidden notes at the end as well
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
c9d3ed361f
commit
89cb063015
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user