commit 36043cf20ad8be3ba4106e25594f231d8bc1f4d2
parent 721471cf0aa2d1892117ca0166c932165a9f85a0
Author: William Casarin <jb55@jb55.com>
Date: Sat, 16 Apr 2022 15:38:25 -0700
don't make highlighted event clickable in details view
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/damus/Views/EventDetailView.swift b/damus/Views/EventDetailView.swift
@@ -91,13 +91,16 @@ struct EventDetailView: View {
var body: some View {
ScrollView {
ForEach(events, id: \.id) { ev in
- let evdet = EventDetailView(event: ev, pool: pool, profiles: profiles)
- .navigationBarTitle("Note")
- NavigationLink(destination: evdet) {
+ if ev.id == event.id {
EventView(event: ev, profile: self.profiles[ev.pubkey]?.profile, highlighted: ev.id == event.id)
+ } else {
+ let evdet = EventDetailView(event: ev, pool: pool, profiles: profiles)
+ .navigationBarTitle("Note")
+ NavigationLink(destination: evdet) {
+ EventView(event: ev, profile: self.profiles[ev.pubkey]?.profile, highlighted: ev.id == event.id)
+ }
+ .buttonStyle(PlainButtonStyle())
}
- .buttonStyle(PlainButtonStyle())
- //EventView(event: ev, profile: self.profiles[ev.pubkey]?.profile, highlighted: ev.id == event.id)
}
}
.padding()