From 51efee4f723ab49da45d4b5679831dfd77d2a2d0 Mon Sep 17 00:00:00 2001 From: Edward Drapkin Date: Wed, 28 Nov 2018 17:33:06 -0500 Subject: [PATCH] Respect GIF metadata for loop counts --- Libraries/Image/RCTGIFImageDecoder.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Image/RCTGIFImageDecoder.m b/Libraries/Image/RCTGIFImageDecoder.m index 322d137cda733c..b8998b3fbb25c7 100644 --- a/Libraries/Image/RCTGIFImageDecoder.m +++ b/Libraries/Image/RCTGIFImageDecoder.m @@ -84,7 +84,7 @@ - (RCTImageLoaderCancellationBlock)decodeImageData:(NSData *)imageData // Create animation CAKeyframeAnimation *animation = [CAKeyframeAnimation animationWithKeyPath:@"contents"]; animation.calculationMode = kCAAnimationDiscrete; - animation.repeatCount = loopCount == 0 ? HUGE_VALF : loopCount; + animation.repeatCount = loopCount; animation.keyTimes = keyTimes; animation.values = images; animation.duration = duration;