rich text composer placeholder text implemented using the same logic of the normal composer

This commit is contained in:
Mauro Romito
2022-10-19 16:32:02 +02:00
parent dfd5a3a271
commit 1fa4dab404
5 changed files with 66 additions and 73 deletions

View File

@@ -29,8 +29,6 @@ import CoreGraphics
// The toolbar for editing with rich text
class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInputToolbarViewProtocol {
// MARK: - Properties
// MARK: Private
@@ -41,6 +39,11 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
private var viewModel: ComposerViewModelProtocol = ComposerViewModel(initialViewState: ComposerViewState())
// MARK: Public
var isEncryptionEnabled = false {
didSet {
updatePlaceholderText()
}
}
/// The current html content of the composer
var htmlContent: String {
@@ -69,6 +72,7 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
}
set {
viewModel.sendMode = ComposerSendMode(from: newValue)
updatePlaceholderText()
}
}