mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix attached content file layout
(cherry picked from commit 7712ad0a27fbaf27a22254af77a18961ff0b0a6f)
This commit is contained in:
parent
90725b9db9
commit
51b1f7a836
@ -786,6 +786,8 @@ final class ChatMessageAttachedContentNode: ASDisplayNode {
|
||||
var imageHeightAddition = size.height + 6.0
|
||||
if textFrame.size.height > CGFloat.ulpOfOne {
|
||||
imageHeightAddition += 6.0
|
||||
} else {
|
||||
imageHeightAddition += 7.0
|
||||
}
|
||||
|
||||
adjustedBoundingSize.height += imageHeightAddition + 5.0
|
||||
@ -931,7 +933,7 @@ final class ChatMessageAttachedContentNode: ASDisplayNode {
|
||||
if let (_, flags) = mediaAndFlags, flags.contains(.preferMediaBeforeText) {
|
||||
contentFileNode.frame = CGRect(origin: CGPoint(x: insets.left, y: insets.top), size: contentFileSize)
|
||||
} else {
|
||||
contentFileNode.frame = CGRect(origin: CGPoint(x: insets.left, y: textFrame.maxY + (textFrame.size.height > CGFloat.ulpOfOne ? 8.0 : 0.0)), size: contentFileSize)
|
||||
contentFileNode.frame = CGRect(origin: CGPoint(x: insets.left, y: textFrame.maxY + (textFrame.size.height > CGFloat.ulpOfOne ? 8.0 : 7.0)), size: contentFileSize)
|
||||
}
|
||||
} else if let contentFileNode = strongSelf.contentFileNode {
|
||||
contentFileNode.removeFromSupernode()
|
||||
|
Loading…
x
Reference in New Issue
Block a user