just use stack navigationview
it seems less buggy Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -169,6 +169,7 @@ struct ContentView: View {
|
||||
}
|
||||
.navigationBarTitle("Damus", displayMode: .inline)
|
||||
}
|
||||
.navigationViewStyle(.stack)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
|
||||
@@ -20,11 +20,6 @@ class ThreadModel: ObservableObject {
|
||||
init(ev: NostrEvent, pool: RelayPool) {
|
||||
self.event = ev
|
||||
self.pool = pool
|
||||
subscribe()
|
||||
}
|
||||
|
||||
deinit {
|
||||
unsubscribe()
|
||||
}
|
||||
|
||||
func unsubscribe() {
|
||||
|
||||
@@ -56,6 +56,7 @@ struct EventActionBar: View {
|
||||
}
|
||||
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,5 +67,6 @@ func EventActionButton(img: String, col: Color?, action: @escaping () -> ()) ->
|
||||
.font(.footnote)
|
||||
.foregroundColor(col == nil ? Color.gray : col!)
|
||||
}
|
||||
.contentShape(Rectangle())
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,12 @@ struct ThreadView: View {
|
||||
is_chatroom = !is_chatroom
|
||||
//print("is_chatroom: \(is_chatroom)")
|
||||
}
|
||||
.onAppear() {
|
||||
thread.subscribe()
|
||||
}
|
||||
.onDisappear() {
|
||||
thread.unsubscribe()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ struct TimelineView: View {
|
||||
NavigationLink(destination: tv) {
|
||||
EventView(event: ev, highlight: .none, has_action_bar: true, pool: pool)
|
||||
}
|
||||
.isDetailLink(true)
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
//.onTapGesture {
|
||||
//NotificationCenter.default.post(name: .open_thread, object: ev)
|
||||
|
||||
Reference in New Issue
Block a user