Ignore to query disk cache when the image for FLAnimatedImageView+WebCache is placeholder

This commit is contained in:
DreamPiggy 2018-08-16 17:54:45 +08:00
parent a794088bc7
commit 14391eb45e
1 changed files with 3 additions and 1 deletions

View File

@ -137,7 +137,9 @@ static inline FLAnimatedImage * SDWebImageCreateFLAnimatedImage(FLAnimatedImageV
}
// Step 2. Check if original compressed image data is "GIF"
BOOL isGIF = (image.sd_imageFormat == SDImageFormatGIF || [NSData sd_imageFormatForImageData:imageData] == SDImageFormatGIF);
if (!isGIF) {
// Check if placeholder, which does not trigger a backup disk cache query
BOOL isPlaceholder = (image == placeholder);
if (!isGIF || isPlaceholder) {
strongSelf.image = image;
strongSelf.animatedImage = nil;
dispatch_group_leave(group);