File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
SDWebImageSwiftUI/Classes Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -221,11 +221,6 @@ public struct AnimatedImage : PlatformViewRepresentable {
221221 }
222222
223223 func updateView( _ view: AnimatedImageViewWrapper , context: Context ) {
224- // macOS SDAnimatedImageView.animates should initialize to true in advance before set image
225- #if os(macOS)
226- view. wrapped. animates = true
227- #endif
228-
229224 if let image = self . image {
230225 #if os(watchOS)
231226 view. wrapped. setImage ( image)
@@ -243,7 +238,9 @@ public struct AnimatedImage : PlatformViewRepresentable {
243238 }
244239
245240 #if os(macOS)
246- view. wrapped. animates = self . isAnimating
241+ if self . isAnimating != view. wrapped. animates {
242+ view. wrapped. animates = self . isAnimating
243+ }
247244 #else
248245 if self . isAnimating != view. wrapped. isAnimating {
249246 if self . isAnimating {
You can’t perform that action at this time.
0 commit comments