mirror of
https://github.com/MessageKit/MessageKit.git
synced 2026-02-06 19:03:19 +00:00
Merge branch 'main' into add-coursicle-to-readme
This commit is contained in:
@@ -333,7 +333,7 @@ extension ChatViewController: InputBarAccessoryViewDelegate {
|
||||
|
||||
let substring = attributedText.attributedSubstring(from: range)
|
||||
let context = substring.attribute(.autocompletedContext, at: 0, effectiveRange: nil)
|
||||
print("Autocompleted: `", substring, "` with context: ", context ?? [])
|
||||
print("Autocompleted: `", substring, "` with context: ", context ?? "-")
|
||||
}
|
||||
|
||||
let components = inputBar.inputTextView.components
|
||||
|
||||
@@ -23,9 +23,20 @@ struct SwiftUIExampleView: View {
|
||||
self.cleanupSocket()
|
||||
}
|
||||
.navigationBarTitle("SwiftUI Example", displayMode: .inline)
|
||||
.modifier(IgnoresSafeArea()) //fixes issue with IBAV placement when keyboard appears
|
||||
}
|
||||
|
||||
// MARK: Private
|
||||
|
||||
private struct IgnoresSafeArea: ViewModifier {
|
||||
func body(content: Content) -> some View {
|
||||
if #available(iOS 14.0, *) {
|
||||
content.ignoresSafeArea(.keyboard, edges: .bottom)
|
||||
} else {
|
||||
content
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func connectToMessageSocket() {
|
||||
MockSocket.shared.connect(with: [SampleData.shared.nathan, SampleData.shared.wu]).onNewMessage { message in
|
||||
|
||||
Reference in New Issue
Block a user