Update the built-in loaders for the new protocol methods
This commit is contained in:
parent
6f90bc083a
commit
9365dad9b0
|
@ -561,6 +561,10 @@ didReceiveResponse:(NSURLResponse *)response
|
||||||
@implementation SDWebImageDownloader (SDImageLoader)
|
@implementation SDWebImageDownloader (SDImageLoader)
|
||||||
|
|
||||||
- (BOOL)canRequestImageForURL:(NSURL *)url {
|
- (BOOL)canRequestImageForURL:(NSURL *)url {
|
||||||
|
return [self canRequestImageForURL:url options:0 context:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)canRequestImageForURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context {
|
||||||
if (!url) {
|
if (!url) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
@ -596,6 +600,10 @@ didReceiveResponse:(NSURLResponse *)response
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)shouldBlockFailedURLWithURL:(NSURL *)url error:(NSError *)error {
|
- (BOOL)shouldBlockFailedURLWithURL:(NSURL *)url error:(NSError *)error {
|
||||||
|
return [self shouldBlockFailedURLWithURL:url error:error options:0 context:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldBlockFailedURLWithURL:(NSURL *)url error:(NSError *)error options:(SDWebImageOptions)options context:(SDWebImageContext *)context {
|
||||||
BOOL shouldBlockFailedURL;
|
BOOL shouldBlockFailedURL;
|
||||||
// Filter the error domain and check error codes
|
// Filter the error domain and check error codes
|
||||||
if ([error.domain isEqualToString:SDWebImageErrorDomain]) {
|
if ([error.domain isEqualToString:SDWebImageErrorDomain]) {
|
||||||
|
|
|
@ -26,6 +26,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)canRequestImageForURL:(NSURL *)url {
|
- (BOOL)canRequestImageForURL:(NSURL *)url {
|
||||||
|
return [self canRequestImageForURL:url options:0 context:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)canRequestImageForURL:(NSURL *)url options:(SDWebImageOptions)options context:(SDWebImageContext *)context {
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +64,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)shouldBlockFailedURLWithURL:(NSURL *)url error:(NSError *)error {
|
- (BOOL)shouldBlockFailedURLWithURL:(NSURL *)url error:(NSError *)error {
|
||||||
|
return [self shouldBlockFailedURLWithURL:url error:error options:0 context:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)shouldBlockFailedURLWithURL:(NSURL *)url error:(NSError *)error options:(SDWebImageOptions)options context:(SDWebImageContext *)context {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue