mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix message preview clipping
This commit is contained in:
parent
5452f275b4
commit
7ee98dc00e
@ -618,7 +618,7 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode,
|
|||||||
initialWidth = ceil(layout.size.width - self.textFieldFrame.origin.x - self.sendButtonFrame.width - layout.safeInsets.left - layout.safeInsets.right + 21.0)
|
initialWidth = ceil(layout.size.width - self.textFieldFrame.origin.x - self.sendButtonFrame.width - layout.safeInsets.left - layout.safeInsets.right + 21.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
let toFrame = CGRect(origin: CGPoint(), size: CGSize(width: initialWidth, height: self.textFieldFrame.height + 1.0))
|
let toFrame = CGRect(origin: CGPoint(x: 0.0, y: -1.0), size: CGSize(width: initialWidth, height: self.textFieldFrame.height + 2.0))
|
||||||
let delta = (toFrame.height - self.messageClipNode.bounds.height) / 2.0
|
let delta = (toFrame.height - self.messageClipNode.bounds.height) / 2.0
|
||||||
|
|
||||||
if cancel && self.animateInputField {
|
if cancel && self.animateInputField {
|
||||||
@ -632,7 +632,7 @@ final class ChatSendMessageActionSheetControllerNode: ViewControllerTracingNode,
|
|||||||
clipDelta -= self.contentContainerNode.frame.height + 16.0
|
clipDelta -= self.contentContainerNode.frame.height + 16.0
|
||||||
}
|
}
|
||||||
|
|
||||||
self.messageClipNode.layer.animateBounds(from: self.messageClipNode.bounds, to: toFrame, duration: duration, timingFunction: kCAMediaTimingFunctionSpring, removeOnCompletion: false, completion: { _ in
|
self.messageClipNode.layer.animateBounds(from: self.messageClipNode.bounds, to: toFrame.offsetBy(dx: 0.0, dy: 1.0), duration: duration, timingFunction: kCAMediaTimingFunctionSpring, removeOnCompletion: false, completion: { _ in
|
||||||
completedBubble = true
|
completedBubble = true
|
||||||
intermediateCompletion()
|
intermediateCompletion()
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user