Merge pull request #2373 from zhongwuzw/fix-loder-manager

Fix SDImageLoaderManager that only load image when loader can handle url
This commit is contained in:
DreamPiggy 2018-07-04 16:46:23 +08:00 committed by GitHub
commit 35e31c9fc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -88,7 +88,7 @@
NSArray<id<SDImageLoader>> *loaders = self.loaders;
UNLOCK(self.loadersLock);
for (id<SDImageLoader> loader in loaders.reverseObjectEnumerator) {
if ([loader respondsToSelector:@selector(loadImageWithURL:options:context:progress:completed:)]) {
if ([loader canLoadWithURL:url]) {
return [loader loadImageWithURL:url options:options context:context progress:progressBlock completed:completedBlock];
}
}

View File

@ -14,7 +14,7 @@
@interface SDWebImagePrefetchToken : NSObject <SDWebImageOperation>
/**
* Cancel the current prefeching.
* Cancel the current prefetching.
*/
- (void)cancel;