added currentDownload Count, to allow someone to see how many operations are left.
This commit is contained in:
parent
75a76d983a
commit
d020aea02f
|
@ -62,6 +62,12 @@ typedef void(^SDWebImageDownloaderCompletedBlock)(UIImage *image, NSData *data,
|
|||
|
||||
@property (assign, nonatomic) NSInteger maxConcurrentDownloads;
|
||||
|
||||
/**
|
||||
* Shows the current amount of downloads that still need to be downloaded
|
||||
*/
|
||||
|
||||
@property (readonly, nonatomic) NSUInteger currentDownloadCount;
|
||||
|
||||
/**
|
||||
* Changes download operations execution order. Default value is `SDWebImageDownloaderFIFOExecutionOrder`.
|
||||
*/
|
||||
|
|
|
@ -104,6 +104,10 @@ static NSString *const kCompletedCallbackKey = @"completed";
|
|||
_downloadQueue.maxConcurrentOperationCount = maxConcurrentDownloads;
|
||||
}
|
||||
|
||||
- (NSUInteger)currentDownloadCount {
|
||||
return _downloadQueue.operationCount;
|
||||
}
|
||||
|
||||
- (NSInteger)maxConcurrentDownloads
|
||||
{
|
||||
return _downloadQueue.maxConcurrentOperationCount;
|
||||
|
|
Loading…
Reference in New Issue