Various Improvements

This commit is contained in:
Ilya Laktyushin
2021-09-29 08:04:11 +03:00
parent 3450418ad2
commit b575edfc1d
23 changed files with 148 additions and 67 deletions

View File

@@ -976,14 +976,16 @@ public final class AnimatedStickerNode: ASDisplayNode {
private var isSetUpForPlayback = false
public func play(firstFrame: Bool = false, fromIndex: Int? = nil) {
switch self.playbackMode {
case .once:
self.isPlaying = true
case .count:
self.currentLoopCount = 0
self.isPlaying = true
default:
break
if !firstFrame {
switch self.playbackMode {
case .once:
self.isPlaying = true
case .count:
self.currentLoopCount = 0
self.isPlaying = true
default:
break
}
}
if self.isSetUpForPlayback {
let directData = self.directData