mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 15:38:28 +02:00
edit is displayed in the WYSIWYG, but the send button still sends a new message instead of correcting the edit
This commit is contained in:
@@ -33,8 +33,16 @@ class SelfSizingHostingController<Content>: UIHostingController<Content> where C
|
||||
}
|
||||
}
|
||||
|
||||
@objc extension MXKRoomInputToolbarView {
|
||||
func setHtml(content: String) {}
|
||||
}
|
||||
|
||||
@objc protocol HtmlRoomInputToolbarViewProtocol: RoomInputToolbarViewProtocol {
|
||||
@objc func setHtml(content: String)
|
||||
}
|
||||
|
||||
@available(iOS 16.0, *)
|
||||
class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, RoomInputToolbarViewProtocol {
|
||||
class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInputToolbarViewProtocol {
|
||||
|
||||
override class func instantiate() -> MXKRoomInputToolbarView! {
|
||||
return loadFromNib()
|
||||
@@ -93,6 +101,10 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, RoomInputTo
|
||||
self.backgroundColor = .clear
|
||||
}
|
||||
|
||||
override func setHtml(content: String) {
|
||||
hostingViewController.rootView.viewModel.setHtmlContent(content)
|
||||
}
|
||||
|
||||
func setVoiceMessageToolbarView(_ voiceMessageToolbarView: UIView!) {
|
||||
//TODO embed the voice messages UI
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user