From 3d1382a1cb3ca4f71532e219775b964f429ccd26 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Sun, 27 Oct 2019 04:47:55 +0800 Subject: [PATCH] Update the shouldAnimate status when animating status changes, to avoid that macOS call `animates = NO`, `setImage:newImage`, `aniamtes = YES`, the animation does not restarted issue --- SDWebImage/Core/SDAnimatedImageView.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SDWebImage/Core/SDAnimatedImageView.m b/SDWebImage/Core/SDAnimatedImageView.m index 1101a528..8e90ce8c 100644 --- a/SDWebImage/Core/SDAnimatedImageView.m +++ b/SDWebImage/Core/SDAnimatedImageView.m @@ -531,7 +531,7 @@ static NSUInteger SDDeviceFreeMemory() { - (void)updateShouldAnimate { #if SD_MAC - BOOL isVisible = self.window && self.superview && ![self isHidden] && self.alphaValue > 0.0 && self.animates; + BOOL isVisible = self.window && self.superview && ![self isHidden] && self.alphaValue > 0.0; #else BOOL isVisible = self.window && self.superview && ![self isHidden] && self.alpha > 0.0; #endif