Chat Import improvements

This commit is contained in:
Ali
2021-01-24 23:13:02 +05:00
parent 2a1d8910d2
commit 0e21298773
5 changed files with 63 additions and 29 deletions

View File

@@ -534,9 +534,16 @@ final class ChatMessageInteractiveFileNode: ASDisplayNode {
let addedWidth = intersection.width + 20
fittedLayoutSize.width += addedWidth
}
if let statusFrameValue = statusFrame, let iconFrame = iconFrame, iconFrame.intersects(statusFrameValue) {
fittedLayoutSize.height += 15.0
statusFrame = statusFrameValue.offsetBy(dx: 0.0, dy: 15.0)
if let statusFrameValue = statusFrame, let iconFrame = iconFrame {
if iconFrame.intersects(statusFrameValue) {
fittedLayoutSize.height += 15.0
statusFrame = statusFrameValue.offsetBy(dx: 0.0, dy: 15.0)
}
} else if let statusFrameValue = statusFrame {
if progressFrame.intersects(statusFrameValue) {
fittedLayoutSize.height += 10.0
statusFrame = statusFrameValue.offsetBy(dx: 0.0, dy: 15.0)
}
}
if (isAudio && !isVoice) || file.previewRepresentations.isEmpty {