Fix coder priority in SDAnimatedImage
Showing 1 of 1 files from the diff.
SDWebImage/Core/SDAnimatedImage.m
changed.
@@ -126,7 +126,7 @@
Loading
126 | 126 | } |
|
127 | 127 | data = [data copy]; // avoid mutable data |
|
128 | 128 | id<SDAnimatedImageCoder> animatedCoder = nil; |
|
129 | - | for (id<SDImageCoder>coder in [SDImageCodersManager sharedManager].coders) { |
|
129 | + | for (id<SDImageCoder>coder in [SDImageCodersManager sharedManager].coders.reverseObjectEnumerator) { |
|
130 | 130 | if ([coder conformsToProtocol:@protocol(SDAnimatedImageCoder)]) { |
|
131 | 131 | if ([coder canDecodeFromData:data]) { |
|
132 | 132 | if (!options) { |
@@ -207,7 +207,7 @@
Loading
207 | 207 | } |
|
208 | 208 | CGFloat scale = self.scale; |
|
209 | 209 | id<SDAnimatedImageCoder> animatedCoder = nil; |
|
210 | - | for (id<SDImageCoder>coder in [SDImageCodersManager sharedManager].coders) { |
|
210 | + | for (id<SDImageCoder>coder in [SDImageCodersManager sharedManager].coders.reverseObjectEnumerator) { |
|
211 | 211 | if ([coder conformsToProtocol:@protocol(SDAnimatedImageCoder)]) { |
|
212 | 212 | if ([coder canDecodeFromData:animatedImageData]) { |
|
213 | 213 | animatedCoder = [[[coder class] alloc] initWithAnimatedImageData:animatedImageData options:@{SDImageCoderDecodeScaleFactor : @(scale)}]; |
Files | Coverage |
---|---|
SDWebImage | 83.40% |
SDWebImageMapKit/MapKit/MKAnnotationView+WebCache.m | 65.51% |
Project Totals (70 files) | 83.33% |
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file.
The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files.
The size and color of each slice is representing the number of statements and the coverage, respectively.