fix for iPhone 14

This commit is contained in:
Mauro Romito 2022-11-30 13:41:08 +01:00
parent 1b6cabf2a7
commit 7869b8f0a2

View file

@ -296,7 +296,12 @@ class WysiwygInputToolbarView: MXKRoomInputToolbarView, NibLoadable, HtmlRoomInp
private func updateTextViewHeight() { private func updateTextViewHeight() {
let height = UIScreen.main.bounds.height let height = UIScreen.main.bounds.height
let barOffset: CGFloat = 68 let barOffset: CGFloat
if let topSafeArea = window?.safeAreaInsets.top, topSafeArea >= 68 {
barOffset = topSafeArea
} else {
barOffset = 68
}
let toolbarHeight: CGFloat = 96 let toolbarHeight: CGFloat = 96
let finalHeight = height - keyboardHeight - toolbarHeight - barOffset let finalHeight = height - keyboardHeight - toolbarHeight - barOffset
wysiwygViewModel.maxExpandedHeight = finalHeight wysiwygViewModel.maxExpandedHeight = finalHeight