Authored by Rok Gregorič

Do not load placeholder image if SDWebImageDelayPlaceholder option specified.

@@ -42,8 +42,7 @@ static char operationArrayKey; @@ -42,8 +42,7 @@ static char operationArrayKey;
42 - (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { 42 - (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock {
43 [self cancelCurrentImageLoad]; 43 [self cancelCurrentImageLoad];
44 objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 44 objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
45 - self.image = placeholder;  
46 - 45 +
47 if (!(options & SDWebImageDelayPlaceholder)) { 46 if (!(options & SDWebImageDelayPlaceholder)) {
48 self.image = placeholder; 47 self.image = placeholder;
49 } 48 }