Web app improvements

This commit is contained in:
Ilya Laktyushin
2022-04-07 20:44:45 +04:00
parent e4cfa80981
commit c0bb57c850
7 changed files with 60 additions and 18 deletions

View File

@@ -109,6 +109,8 @@ public final class AnimatedStickerComponent: Component {
playbackMode = .loop
} else if component.isAnimating {
playbackMode = .once
} else {
animationNode.autoplay = true
}
animationNode.setup(source: source, width: Int(component.size.width * component.animation.scale), height: Int(component.size.height * component.animation.scale), playbackMode: playbackMode, mode: .direct(cachePathPrefix: nil))
animationNode.visibility = self.isInHierarchy