Permalink
Browse files

Force progressive download off when force refresh is on #326

  • Loading branch information...
1 parent f097ef7 commit 9b574e58bf9b14b663ef09f869efd940a8eddb7e @rs committed Mar 12, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 SDWebImage/SDWebImageManager.m
View
1 SDWebImage/SDWebImageManager.m
@@ -108,6 +108,7 @@ - (NSString *)cacheKeyForURL:(NSURL *)url
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<SDWebImageOperation> subOperation = [self.imageDownloader downloadImageWithURL:url options:downloaderOptions progress:progressBlock completed:^(UIImage *downloadedImage, NSData *data, NSError *error, BOOL finished)
{
if (weakOperation.cancelled)

0 comments on commit 9b574e5

Please sign in to comment.