Fix the bug that when querying original cache miss, the download process will be skipped. This is not designed behavior.

This commit is contained in:
DreamPiggy 2021-04-23 12:40:56 +08:00
parent e88df1f819
commit 896c5f62f7
1 changed files with 4 additions and 0 deletions

View File

@ -333,6 +333,10 @@ static id<SDImageLoader> _defaultImageLoader;
[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