Fix message input height computation for paid messages

This commit is contained in:
Ilya Laktyushin 2025-03-02 05:59:11 +04:00
parent a42f04ba50
commit 0cd1770a0a
2 changed files with 8 additions and 3 deletions

View File

@ -632,8 +632,10 @@ public class AttachmentTextInputPanelNode: ASDisplayNode, TGCaptionPanelView, AS
}
private func calculateTextFieldMetrics(width: CGFloat, maxHeight: CGFloat, metrics: LayoutMetrics) -> (accessoryButtonsWidth: CGFloat, textFieldHeight: CGFloat) {
let textFieldInsets = self.textFieldInsets(metrics: metrics)
var textFieldInsets = self.textFieldInsets(metrics: metrics)
if self.actionButtons.frame.width > 44.0 {
textFieldInsets.right = self.actionButtons.frame.width
}
let fieldMaxHeight = textFieldMaxHeight(maxHeight, metrics: metrics)
var textFieldMinHeight: CGFloat = 35.0

View File

@ -1316,7 +1316,10 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate, Ch
let accessoryButtonInset = self.accessoryButtonInset
let accessoryButtonSpacing = self.accessoryButtonSpacing
let textFieldInsets = self.textFieldInsets(metrics: metrics)
var textFieldInsets = self.textFieldInsets(metrics: metrics)
if self.actionButtons.frame.width > 44.0 {
textFieldInsets.right = self.actionButtons.frame.width - 2.0
}
let fieldMaxHeight = textFieldMaxHeight(maxHeight, metrics: metrics)