hide button and revert state when rotating on an iPhone, also fixed the positioning of the strikethrough and underline, and the maxCompressed size in landscape mode is always adapted to be visible.

This commit is contained in:
Mauro Romito
2022-11-22 18:21:59 +01:00
parent 1271e88212
commit fd68af1cef
3 changed files with 23 additions and 7 deletions
@@ -286,9 +286,14 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
private func updateTextViewHeight() {
let height = UIScreen.main.bounds.height
let barOffset: CGFloat = 68
let toolbarHeight: CGFloat = 82
let toolbarHeight: CGFloat = 96
let finalHeight = height - keyboardHeight - toolbarHeight - barOffset
wysiwygViewModel.maxExpandedHeight = finalHeight
if finalHeight < 200 {
wysiwygViewModel.maxCompressedHeight = finalHeight > wysiwygViewModel.minHeight ? finalHeight : wysiwygViewModel.minHeight
} else {
wysiwygViewModel.maxCompressedHeight = 200
}
}
// MARK: - HtmlRoomInputToolbarViewProtocol