Merge pull request #1971 from kekeYezi/master
Small change - coding style
This commit is contained in:
commit
3c64b81ac1
|
@ -351,8 +351,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
||||||
image = [UIImage decodedImageWithImage:image];
|
image = [UIImage decodedImageWithImage:image];
|
||||||
}
|
}
|
||||||
return image;
|
return image;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,7 @@ inline UIImage *SDScaledImageForKey(NSString * _Nullable key, UIImage * _Nullabl
|
||||||
}
|
}
|
||||||
|
|
||||||
return [UIImage animatedImageWithImages:scaledImages duration:image.duration];
|
return [UIImage animatedImageWithImages:scaledImages duration:image.duration];
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
#if SD_WATCH
|
#if SD_WATCH
|
||||||
if ([[WKInterfaceDevice currentDevice] respondsToSelector:@selector(screenScale)]) {
|
if ([[WKInterfaceDevice currentDevice] respondsToSelector:@selector(screenScale)]) {
|
||||||
#elif SD_UIKIT
|
#elif SD_UIKIT
|
||||||
|
|
|
@ -119,8 +119,7 @@
|
||||||
- (void)setValue:(nullable NSString *)value forHTTPHeaderField:(nullable NSString *)field {
|
- (void)setValue:(nullable NSString *)value forHTTPHeaderField:(nullable NSString *)field {
|
||||||
if (value) {
|
if (value) {
|
||||||
self.HTTPHeaders[field] = value;
|
self.HTTPHeaders[field] = value;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
[self.HTTPHeaders removeObjectForKey:field];
|
[self.HTTPHeaders removeObjectForKey:field];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,7 +263,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setSuspended:(BOOL)suspended {
|
- (void)setSuspended:(BOOL)suspended {
|
||||||
(self.downloadQueue).suspended = suspended;
|
self.downloadQueue.suspended = suspended;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)cancelAllDownloads {
|
- (void)cancelAllDownloads {
|
||||||
|
|
|
@ -272,8 +272,7 @@ didReceiveResponse:(NSURLResponse *)response
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadReceiveResponseNotification object:weakSelf];
|
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadReceiveResponseNotification object:weakSelf];
|
||||||
});
|
});
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
NSUInteger code = ((NSHTTPURLResponse *)response).statusCode;
|
NSUInteger code = ((NSHTTPURLResponse *)response).statusCode;
|
||||||
|
|
||||||
//This is the case when server returns '304 Not Modified'. It means that remote image is not changed.
|
//This is the case when server returns '304 Not Modified'. It means that remote image is not changed.
|
||||||
|
|
|
@ -61,7 +61,7 @@ typedef void(^SDWebImagePrefetcherCompletionBlock)(NSUInteger noOfFinishedUrls,
|
||||||
/**
|
/**
|
||||||
* Queue options for Prefetcher. Defaults to Main Queue.
|
* Queue options for Prefetcher. Defaults to Main Queue.
|
||||||
*/
|
*/
|
||||||
@property (nonatomic, assign, nonnull) dispatch_queue_t prefetcherQueue;
|
@property (SDDispatchQueueSetterSementics, nonatomic, nonnull) dispatch_queue_t prefetcherQueue;
|
||||||
|
|
||||||
@property (weak, nonatomic, nullable) id <SDWebImagePrefetcherDelegate> delegate;
|
@property (weak, nonatomic, nullable) id <SDWebImagePrefetcherDelegate> delegate;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue