Skip to content

Commit

Permalink
Merge pull request #3221 from dreampiggy/bugfix_original_cache_miss_c…
Browse files Browse the repository at this point in the history
…ontinue_download

Fix the bug that when querying original cache miss, the download process will be skipped. This is not designed behavior.
  • Loading branch information
dreampiggy committed Apr 23, 2021
2 parents e88df1f + 896c5f6 commit a419906
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions SDWebImage/Core/SDWebImageManager.m
Expand Up @@ -333,6 +333,10 @@ - (void)callOriginalCacheProcessForOperation:(nonnull SDWebImageCombinedOperatio
[self callCompletionBlockForOperation:operation completion:completedBlock error:[NSError errorWithDomain:SDWebImageErrorDomain code:SDWebImageErrorCancelled userInfo:@{NSLocalizedDescriptionKey : @"Operation cancelled by user during querying the cache"}] url:url];
[self safelyRemoveOperationFromRunning:operation];
return;
} else if (context[SDWebImageContextImageTransformer] && !cachedImage) {
// Original image cache miss. Continue download process
[self callDownloadProcessForOperation:operation url:url options:options context:context cachedImage:nil cachedData:nil cacheType:originalQueryCacheType progress:progressBlock completed:completedBlock];
return;
}

// Use the store cache process instead of downloading, and ignore .refreshCached option for now
Expand Down

0 comments on commit a419906

Please sign in to comment.