mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Stickers Import Improvements
This commit is contained in:
@@ -119,14 +119,16 @@ final class StickerPackPreviewGridItemNode: GridItemNode {
|
||||
self.imageNode.image = image
|
||||
dimensions = image.size
|
||||
}
|
||||
case let .animation(data):
|
||||
case .animation:
|
||||
self.imageNode.isHidden = true
|
||||
let animationNode = AnimatedStickerNode()
|
||||
self.animationNode = animationNode
|
||||
self.addSubnode(animationNode)
|
||||
|
||||
let fittedDimensions = dimensions.aspectFitted(CGSize(width: 160.0, height: 160.0))
|
||||
// animationNode.setup(source: AnimatedStickerResourceSource(account: account, resource: stickerItem.file.resource), width: Int(fittedDimensions.width), height: Int(fittedDimensions.height), mode: .cached)
|
||||
if let resource = stickerItem.resource {
|
||||
animationNode.setup(source: AnimatedStickerResourceSource(account: account, resource: resource), width: Int(fittedDimensions.width), height: Int(fittedDimensions.height), mode: .direct(cachePathPrefix: nil))
|
||||
}
|
||||
animationNode.visibility = self.isVisibleInGrid && self.interaction?.playAnimatedStickers ?? true
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user