@@ -42,7 +42,7 @@ struct ChatView: View {
|
||||
}
|
||||
|
||||
var is_active: Bool {
|
||||
return thread.event.id == event.id
|
||||
return thread.initial_event.id == event.id
|
||||
}
|
||||
|
||||
func prev_reply_is_same() -> String? {
|
||||
|
||||
@@ -24,7 +24,7 @@ struct ChatroomView: View {
|
||||
damus: damus
|
||||
)
|
||||
.onTapGesture {
|
||||
if thread.event.id == ev.id {
|
||||
if thread.initial_event.id == ev.id {
|
||||
//dismiss()
|
||||
toggle_thread_view()
|
||||
} else {
|
||||
@@ -37,13 +37,13 @@ struct ChatroomView: View {
|
||||
}
|
||||
.onReceive(NotificationCenter.default.publisher(for: .select_quote)) { notif in
|
||||
let ev = notif.object as! NostrEvent
|
||||
if ev.id != thread.event.id {
|
||||
if ev.id != thread.initial_event.id {
|
||||
thread.set_active_event(ev)
|
||||
}
|
||||
scroll_to_event(scroller: scroller, id: ev.id, delay: 0, animate: true, anchor: .top)
|
||||
}
|
||||
.onAppear() {
|
||||
scroll_to_event(scroller: scroller, id: thread.event.id, delay: 0.3, animate: true, anchor: .bottom)
|
||||
scroll_to_event(scroller: scroller, id: thread.initial_event.id, delay: 0.3, animate: true, anchor: .bottom)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ struct EventDetailView: View {
|
||||
case .event(let ev, let highlight):
|
||||
EventView(event: ev, highlight: highlight, has_action_bar: true, damus: damus)
|
||||
.onTapGesture {
|
||||
if thread.event.id == ev.id {
|
||||
if thread.initial_event.id == ev.id {
|
||||
toggle_thread_view()
|
||||
} else {
|
||||
thread.set_active_event(ev)
|
||||
|
||||
@@ -102,7 +102,7 @@ struct EventView: View {
|
||||
}
|
||||
|
||||
Button {
|
||||
UIPasteboard.general.string = event.id
|
||||
UIPasteboard.general.string = "&" + event.id
|
||||
} label: {
|
||||
Label("Copy ID", systemImage: "tag")
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ struct TimelineView: View {
|
||||
.environmentObject(profiles)
|
||||
*/
|
||||
|
||||
let tv = ThreadView(thread: ThreadModel(ev: ev, pool: damus.pool), damus: damus)
|
||||
let tv = ThreadView(thread: ThreadModel(event: ev, pool: damus.pool), damus: damus)
|
||||
.environmentObject(profiles)
|
||||
|
||||
NavigationLink(destination: tv) {
|
||||
|
||||
Reference in New Issue
Block a user