use simplified chat controller, fix keyboard removing on tap (#275)

This commit is contained in:
Evgeny Poberezkin
2022-02-06 18:26:22 +00:00
committed by GitHub
parent 408a30c25b
commit 8efb8b2f86
9 changed files with 77 additions and 88 deletions

View File

@@ -27,6 +27,9 @@ struct ChatView: View {
.onChange(of: chatModel.chatItems.count) { _ in scrollToBottom(proxy) }
}
}
.onTapGesture {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
}
}
}
@@ -66,9 +69,6 @@ struct ChatView: View {
}
}
.navigationBarBackButtonHidden(true)
.onTapGesture {
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
}
}
func scrollToBottom(_ proxy: ScrollViewProxy) {