Merge pull request #562 from mknippen/master
added currentDownload Count, to allow someone to see how many operations are left.
This commit is contained in:
commit
1872fed8f0
|
@ -62,6 +62,12 @@ typedef void(^SDWebImageDownloaderCompletedBlock)(UIImage *image, NSData *data,
|
||||||
|
|
||||||
@property (assign, nonatomic) NSInteger maxConcurrentDownloads;
|
@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`.
|
* Changes download operations execution order. Default value is `SDWebImageDownloaderFIFOExecutionOrder`.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -104,6 +104,11 @@ static NSString *const kCompletedCallbackKey = @"completed";
|
||||||
_downloadQueue.maxConcurrentOperationCount = maxConcurrentDownloads;
|
_downloadQueue.maxConcurrentOperationCount = maxConcurrentDownloads;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSUInteger)currentDownloadCount
|
||||||
|
{
|
||||||
|
return _downloadQueue.operationCount;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSInteger)maxConcurrentDownloads
|
- (NSInteger)maxConcurrentDownloads
|
||||||
{
|
{
|
||||||
return _downloadQueue.maxConcurrentOperationCount;
|
return _downloadQueue.maxConcurrentOperationCount;
|
||||||
|
|
Loading…
Reference in New Issue