Fix static stickerpack thumbnail

This commit is contained in:
Ilya Laktyushin
2021-08-08 01:31:56 +03:00
parent b1e50b3f27
commit 9394d80e4f
2 changed files with 3 additions and 2 deletions

View File

@@ -91,6 +91,7 @@ final class ChatMediaInputSettingsItemNode: ListViewItemNode {
self.containerNode.addSubnode(self.scalingNode) self.containerNode.addSubnode(self.scalingNode)
self.scalingNode.addSubnode(self.buttonNode) self.scalingNode.addSubnode(self.buttonNode)
self.scalingNode.addSubnode(self.titleNode)
self.scalingNode.addSubnode(self.imageNode) self.scalingNode.addSubnode(self.imageNode)
} }

View File

@@ -215,11 +215,11 @@ final class ChatMediaInputStickerPackItemNode: ListViewItemNode {
switch thumbnailItem { switch thumbnailItem {
case let .still(representation): case let .still(representation):
imageSize = representation.dimensions.cgSize.aspectFitted(boundingImageSize) imageSize = representation.dimensions.cgSize.aspectFitted(boundingImageSize)
let imageApply = self.imageNode.asyncLayout()(TransformImageArguments(corners: ImageCorners(), imageSize: imageSize, boundingSize: imageSize, intrinsicInsets: UIEdgeInsets())) let imageApply = self.imageNode.asyncLayout()(TransformImageArguments(corners: ImageCorners(), imageSize: imageSize, boundingSize: boundingImageSize, intrinsicInsets: UIEdgeInsets()))
imageApply() imageApply()
self.imageNode.setSignal(chatMessageStickerPackThumbnail(postbox: account.postbox, resource: representation.resource, nilIfEmpty: true)) self.imageNode.setSignal(chatMessageStickerPackThumbnail(postbox: account.postbox, resource: representation.resource, nilIfEmpty: true))
case let .animated(resource, _): case let .animated(resource, _):
let imageApply = self.imageNode.asyncLayout()(TransformImageArguments(corners: ImageCorners(), imageSize: imageSize, boundingSize: imageSize, intrinsicInsets: UIEdgeInsets())) let imageApply = self.imageNode.asyncLayout()(TransformImageArguments(corners: ImageCorners(), imageSize: imageSize, boundingSize: boundingImageSize, intrinsicInsets: UIEdgeInsets()))
imageApply() imageApply()
self.imageNode.setSignal(chatMessageStickerPackThumbnail(postbox: account.postbox, resource: resource, animated: true, nilIfEmpty: true)) self.imageNode.setSignal(chatMessageStickerPackThumbnail(postbox: account.postbox, resource: resource, animated: true, nilIfEmpty: true))