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