mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix message input height computation for paid messages
This commit is contained in:
parent
a42f04ba50
commit
0cd1770a0a
@ -632,8 +632,10 @@ public class AttachmentTextInputPanelNode: ASDisplayNode, TGCaptionPanelView, AS
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func calculateTextFieldMetrics(width: CGFloat, maxHeight: CGFloat, metrics: LayoutMetrics) -> (accessoryButtonsWidth: CGFloat, textFieldHeight: CGFloat) {
|
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)
|
let fieldMaxHeight = textFieldMaxHeight(maxHeight, metrics: metrics)
|
||||||
|
|
||||||
var textFieldMinHeight: CGFloat = 35.0
|
var textFieldMinHeight: CGFloat = 35.0
|
||||||
|
@ -1316,7 +1316,10 @@ class ChatTextInputPanelNode: ChatInputPanelNode, ASEditableTextNodeDelegate, Ch
|
|||||||
let accessoryButtonInset = self.accessoryButtonInset
|
let accessoryButtonInset = self.accessoryButtonInset
|
||||||
let accessoryButtonSpacing = self.accessoryButtonSpacing
|
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)
|
let fieldMaxHeight = textFieldMaxHeight(maxHeight, metrics: metrics)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user