Skip to content

Commit 0fe0ff5

Browse files
authored
Merge pull request #171 from SDWebImage/fix_rare_webimage_animating
Fix the rare cases that WebImage will lost animation when visibility changes.
2 parents d0afa1c + 69413ec commit 0fe0ff5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Diff for: SDWebImageSwiftUI/Classes/ImagePlayer.swift

+1-6
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,7 @@ public final class ImagePlayer : ObservableObject {
8282

8383
self.player = imagePlayer
8484

85-
// Setup poster frame
86-
if let cgImage = animatedImage.cgImage {
87-
currentFrame = PlatformImage(cgImage: cgImage, scale: animatedImage.scale, orientation: .up)
88-
} else {
89-
currentFrame = .empty
90-
}
85+
imagePlayer.startPlaying()
9186
}
9287
}
9388
}

0 commit comments

Comments
 (0)