Various improvements

This commit is contained in:
Ali
2023-10-18 20:43:42 +04:00
parent 9ebff2dd6c
commit 965be89632
6 changed files with 44 additions and 17 deletions

View File

@@ -589,7 +589,7 @@ public class AttachmentTextInputPanelNode: ASDisplayNode, TGCaptionPanelView, AS
let textFieldHeight: CGFloat
if let textInputNode = self.textInputNode {
let maxTextWidth = width - textFieldInsets.left - textFieldInsets.right - self.textInputViewInternalInsets.left - self.textInputViewInternalInsets.right
let measuredHeight = textInputNode.textHeightForWidth(maxTextWidth)
let measuredHeight = textInputNode.textHeightForWidth(maxTextWidth, rightInset: 0.0)
let unboundTextFieldHeight = max(textFieldMinHeight, ceil(measuredHeight))
let maxNumberOfLines = min(12, (Int(fieldMaxHeight - 11.0) - 33) / 22)