Update SDWebImageDownloaderOperation.m
This commit is contained in:
parent
515a5f7ac0
commit
2215db45a4
|
@ -181,16 +181,11 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
|
|||
}
|
||||
|
||||
if (self.dataTask) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunguarded-availability"
|
||||
if ([self.dataTask respondsToSelector:@selector(setPriority:)]) {
|
||||
if (self.options & SDWebImageDownloaderHighPriority) {
|
||||
self.dataTask.priority = NSURLSessionTaskPriorityHigh;
|
||||
} else if (self.options & SDWebImageDownloaderLowPriority) {
|
||||
self.dataTask.priority = NSURLSessionTaskPriorityLow;
|
||||
}
|
||||
if (self.options & SDWebImageDownloaderHighPriority) {
|
||||
self.dataTask.priority = NSURLSessionTaskPriorityHigh;
|
||||
} else if (self.options & SDWebImageDownloaderLowPriority) {
|
||||
self.dataTask.priority = NSURLSessionTaskPriorityLow;
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
[self.dataTask resume];
|
||||
for (SDWebImageDownloaderProgressBlock progressBlock in [self callbacksForKey:kProgressCallbackKey]) {
|
||||
progressBlock(0, NSURLResponseUnknownLength, self.request.URL);
|
||||
|
|
Loading…
Reference in New Issue