Merge pull request #171 from SDWebImage/fix_rare_webimage_animating
Fix the rare cases that WebImage will lost animation when visibility changes.
This commit is contained in:
commit
0fe0ff5846
|
@ -82,12 +82,7 @@ public final class ImagePlayer : ObservableObject {
|
|||
|
||||
self.player = imagePlayer
|
||||
|
||||
// Setup poster frame
|
||||
if let cgImage = animatedImage.cgImage {
|
||||
currentFrame = PlatformImage(cgImage: cgImage, scale: animatedImage.scale, orientation: .up)
|
||||
} else {
|
||||
currentFrame = .empty
|
||||
}
|
||||
imagePlayer.startPlaying()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue