Various improvements

This commit is contained in:
Isaac
2024-06-24 18:19:53 +01:00
parent 13026a5cc4
commit 6807abf42c
21 changed files with 915 additions and 211 deletions

View File

@@ -398,6 +398,8 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode {
} else {
let contentMode: InteractiveMediaNodeContentMode = contentMediaAspectFilled ? .aspectFill : .aspectFit
let automaticDownload = shouldDownloadMediaAutomatically(settings: automaticDownloadSettings, peerType: associatedData.automaticDownloadPeerType, networkType: associatedData.automaticDownloadNetworkType, authorPeerId: message.author?.id, contactsPeerIds: associatedData.contactsPeerIds, media: contentMediaValue)
let (_, initialImageWidth, refineLayout) = makeContentMedia(
context,
presentationData,
@@ -406,7 +408,7 @@ public final class ChatMessageAttachedContentNode: ASDisplayNode {
attributes,
contentMediaValue,
nil,
.full,
automaticDownload ? .full : .none,
associatedData.automaticDownloadPeerType,
associatedData.automaticDownloadPeerId,
.constrained(CGSize(width: constrainedSize.width - insets.left - insets.right, height: constrainedSize.height)),