Convert remaining navigation links
This commit is contained in:
committed by
William Casarin
parent
8258c5beb0
commit
0018e7ad57
@@ -18,13 +18,11 @@ struct DirectMessagesView: View {
|
||||
@State var dm_type: DMType = .friend
|
||||
@ObservedObject var model: DirectMessagesModel
|
||||
@ObservedObject var settings: UserSettingsStore
|
||||
|
||||
@EnvironmentObject var navigationCoordinator: NavigationCoordinator
|
||||
|
||||
func MainContent(requests: Bool) -> some View {
|
||||
ScrollView {
|
||||
let chat = DMChatView(damus_state: damus_state, dms: model.active_model)
|
||||
NavigationLink(destination: chat, isActive: $model.open_dm) {
|
||||
EmptyView()
|
||||
}
|
||||
LazyVStack(spacing: 0) {
|
||||
if model.dms.isEmpty, !model.loading {
|
||||
EmptyTimelineView()
|
||||
@@ -54,7 +52,8 @@ struct DirectMessagesView: View {
|
||||
if ok, let ev = model.events.last {
|
||||
EventView(damus: damus_state, event: ev, pubkey: model.pubkey, options: options)
|
||||
.onTapGesture {
|
||||
self.model.open_dm_by_model(model)
|
||||
self.model.set_active_dm_model(model)
|
||||
navigationCoordinator.push(route: Route.DMChat(dms: self.model.active_model))
|
||||
}
|
||||
|
||||
Divider()
|
||||
|
||||
Reference in New Issue
Block a user