diff --git a/Pod/Classes/PINProgressiveImage.m b/Pod/Classes/PINProgressiveImage.m index 351a007..55a80ff 100644 --- a/Pod/Classes/PINProgressiveImage.m +++ b/Pod/Classes/PINProgressiveImage.m @@ -165,7 +165,7 @@ return nil; } - if (_estimatedRemainingTimeThreshold < 0 || self.estimatedRemainingTime < _estimatedRemainingTimeThreshold) { + if (_estimatedRemainingTimeThreshold > 0 && self.estimatedRemainingTime < _estimatedRemainingTimeThreshold) { [self.lock unlock]; return nil; } diff --git a/Pod/Classes/PINRemoteImageManager.h b/Pod/Classes/PINRemoteImageManager.h index c315200..b64d812 100644 --- a/Pod/Classes/PINRemoteImageManager.h +++ b/Pod/Classes/PINRemoteImageManager.h @@ -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. diff --git a/Pod/Classes/PINRemoteImageManager.m b/Pod/Classes/PINRemoteImageManager.m index f83c762..1b39754 100644 --- a/Pod/Classes/PINRemoteImageManager.m +++ b/Pod/Classes/PINRemoteImageManager.m @@ -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;