From 9b574e58bf9b14b663ef09f869efd940a8eddb7e Mon Sep 17 00:00:00 2001 From: Olivier Poitrey Date: Tue, 12 Mar 2013 14:55:05 +0100 Subject: [PATCH] Force progressive download off when force refresh is on #326 --- SDWebImage/SDWebImageManager.m | 1 + 1 file changed, 1 insertion(+) diff --git a/SDWebImage/SDWebImageManager.m b/SDWebImage/SDWebImageManager.m index 8cc28fd..43457ef 100644 --- a/SDWebImage/SDWebImageManager.m +++ b/SDWebImage/SDWebImageManager.m @@ -108,6 +108,7 @@ if (options & SDWebImageLowPriority) downloaderOptions |= SDWebImageDownloaderLowPriority; if (options & SDWebImageProgressiveDownload) downloaderOptions |= SDWebImageDownloaderProgressiveDownload; if (options & SDWebImageRefreshCached) downloaderOptions |= SDWebImageDownloaderEnableNSURLCache; + if (image && options & SDWebImageRefreshCached) downloaderOptions ^= SDWebImageDownloaderProgressiveDownload; // force progressive off if image is refreshing __block id subOperation = [self.imageDownloader downloadImageWithURL:url options:downloaderOptions progress:progressBlock completed:^(UIImage *downloadedImage, NSData *data, NSError *error, BOOL finished) { if (weakOperation.cancelled)