Fix attached content text positioning

This commit is contained in:
Ali 2022-06-11 21:54:45 +01:00
parent 04003556f0
commit 111bdb8558

View File

@ -980,11 +980,13 @@ final class ChatMessageAttachedContentNode: ASDisplayNode {
if let statusSizeAndApply = statusSizeAndApply {
var statusFrame = CGRect(origin: CGPoint(x: strongSelf.textNode.frame.minX, y: strongSelf.textNode.frame.maxY), size: statusSizeAndApply.0)
if let imageFrame = imageFrame {
if statusFrame.maxY < imageFrame.maxY + 10.0 {
statusFrame.origin.y = max(statusFrame.minY, imageFrame.maxY + 2.0)
if statusFrame.height == 0.0 {
statusFrame.origin.y += 14.0
}
}
}
if strongSelf.statusNode.supernode == nil {
strongSelf.addSubnode(strongSelf.statusNode)
strongSelf.statusNode.frame = statusFrame