Bläddra i källkod

The progressive animation should not update the loop count to 1 when automatically stopped at last index.

DreamPiggy 6 år sedan
förälder
incheckning
5510650c04
1 ändrade filer med 2 tillägg och 1 borttagningar
  1. 2 1
      SDWebImage/Core/SDAnimatedImageView.m

+ 2 - 1
SDWebImage/Core/SDAnimatedImageView.m

@@ -166,12 +166,13 @@
         };
         self.player.animationLoopHandler = ^(NSUInteger loopCount) {
             @strongify(self);
-            self.currentLoopCount = loopCount;
             // Progressive image reach the current last frame index. Keep the state and pause animating. Wait for later restart
             if (self.isProgressive) {
                 NSUInteger lastFrameIndex = self.player.totalFrameCount - 1;
                 [self.player seekToFrameAtIndex:lastFrameIndex loopCount:0];
                 [self.player pausePlaying];
+            } else {
+                self.currentLoopCount = loopCount;
             }
         };