mirror of
https://github.com/zhigang1992/PINRemoteImage.git
synced 2026-03-27 22:53:53 +08:00
Modify estimatedRemainingTimeThreshhold Behavior to Match Documentation (#184)
* Modify estimatedRemainingTimeThreshhold behavior to match documentation * Update documentation on maxProgressiveRenderSize property * Update the behavior, not the docs
This commit is contained in:
committed by
Garrett Moon
parent
e6cf241648
commit
632e1bcd2a
@@ -165,7 +165,7 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
if (_estimatedRemainingTimeThreshold < 0 || self.estimatedRemainingTime < _estimatedRemainingTimeThreshold) {
|
||||
if (_estimatedRemainingTimeThreshold > 0 && self.estimatedRemainingTime < _estimatedRemainingTimeThreshold) {
|
||||
[self.lock unlock];
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -218,7 +218,7 @@ typedef void(^PINRemoteImageManagerProgressDownload)(int64_t completedBytes, int
|
||||
completion:(nullable dispatch_block_t)completion;
|
||||
|
||||
/**
|
||||
Set the estimated time remaining to download threshold at which to generate progressive images. Progressive images previews will only be generated if the estimated remaining time on a download is greater than estimatedTimeRemainingThreshold. If estimatedTimeRemainingThreshold is less than zero, this check is skipped.
|
||||
Set the estimated time remaining to download threshold at which to generate progressive images. Progressive images previews will only be generated if the estimated remaining time on a download is greater than estimatedTimeRemainingThreshold. If estimatedTimeRemainingThreshold is less than or equal to zero, this check is skipped.
|
||||
|
||||
@param estimatedRemainingTimeThreshold The estimated remaining time threshold used to decide to skip progressive rendering. Defaults to 0.1.
|
||||
@param completion Completion to be called once estimatedTimeRemainingTimeThreshold is set.
|
||||
@@ -245,7 +245,7 @@ typedef void(^PINRemoteImageManagerProgressDownload)(int64_t completedBytes, int
|
||||
completion:(nullable dispatch_block_t)completion;
|
||||
|
||||
/**
|
||||
Sets the maximum size of an image that PINRemoteImage will blur. If the image is too large, blurring is skipped
|
||||
Sets the maximum size of an image that PINRemoteImage will render progessively. If the image is too large, progressive rendering is skipped.
|
||||
|
||||
@param maxProgressiveRenderSize A CGSize which indicates the max size PINRemoteImage will render a progressive image. If an image is larger in either dimension, progressive rendering will be skipped
|
||||
@param completion Completion to be called once maxProgressiveRenderSize is set.
|
||||
|
||||
@@ -196,7 +196,7 @@ static dispatch_once_t sharedDispatchToken;
|
||||
self.sessionManager = [[PINURLSessionManager alloc] initWithSessionConfiguration:configuration];
|
||||
self.sessionManager.delegate = self;
|
||||
|
||||
self.estimatedRemainingTimeThreshold = 0.0;
|
||||
self.estimatedRemainingTimeThreshold = 0.1;
|
||||
self.timeout = PINRemoteImageManagerDefaultTimeout;
|
||||
|
||||
_highQualityBPSThreshold = 500000;
|
||||
|
||||
Reference in New Issue
Block a user