Commit Graph

39 Commits

Author SHA1 Message Date
Bogdan Poplauschi a8fca6584f Continuation of Fix #1366, addresses #1350 and reverts a part of #1221 - from commit 6406d8e, the wrong usage of dispatch_apply
This one fixes: #1425 and #1426
2016-01-19 19:08:18 +02:00
Bogdan Poplauschi cac21e106d Fix #1366, addresses #1350 and reverts a part of #1221 - from commit 6406d8e, the wrong usage of dispatch_apply 2016-01-08 16:50:35 +02:00
Oliver Eikemeier 92e38160d6 Fix compilation error introduced in commit 6406d8e526 2015-10-27 13:44:19 +01:00
Bogdan Poplauschi ac98896099 Code style 2015-10-25 19:32:31 +02:00
Harish Krishnamurthy 6406d8e526 Modifies SDWebImagePrefetcher prefetching logic.
- Removes recursive calls to startPrefetchingAtIndex.
- Uses dispatch_apply with striding to optimize the performance.
2015-10-25 19:30:29 +02:00
Konstantinos K. 2d748f1e2f Merge pull request #1321 from mythodeia/master
Added a new constructor to SDWebImagePrefetcher
2015-09-29 10:27:51 +03:00
KonstantinosK 944fd77965 Added a new constructor to SDWebImagePrefetcher
that allows it to be instantiated with any image manager
2015-09-29 10:27:09 +03:00
Ariel Elkin 6814af4ade SDWebImagePrefetcher: remove logging
Remove macro that checks for DEBUG, SD_VERBOSE, and SD_LOG_NONE
Remove calls to NSLog
2015-08-31 10:49:33 +02:00
Nathan Wong 6edface2c3 Fix typo "timeElasped" -> "timeElapsed" 2015-08-14 15:45:32 +01:00
Bogdan Poplauschi 6e947240a0 Merge pull request #1017 from warld-limited/prefetcher_patch
[Memory Issue] Clear SDWebImagePrefetcher progressBlock when it has completed
2015-03-19 13:47:17 +02:00
Katsuma Ito 0e047941e9 Clear SDWebImagePrefetcher progressBlock when it has completed
If progressblock captures objects, captured objects remain until next SDWebImagePrefetcher works.
So, nil clear progressBlock as well as completionBlock.
2015-01-20 18:33:10 +08:00
Harish Krishnamurthy 4ceb6665b2 * Adds Queue options to SDWebImagePrefetcher.
* Adds option to decompress images in cache and post download.
2014-12-22 16:03:45 -05:00
Alexis Creuzot 98082a6791 Handle empty urls NSArray
In some cases the user may end up with an empty urls NSArray, in which case the completion block is never called.
This commit handle such case to call immediately the completion block (if any)
2014-10-14 11:16:58 +02:00
Bogdan Poplauschi ee3c351abd Fixed #900 by adding a new flag SD_LOG_NONE that allows silencing the SD logs from the Prefetcher 2014-09-22 22:15:45 +03:00
Bogdan Poplauschi b88a552fba Updated all block params and properties, using defined blocks that have var names (for proper autocomplete). Created a SDWebImageNoParamsBlock to distinguish easier from other no params blocks. Fixes #810 2014-07-16 15:17:08 +03:00
Bogdan Poplauschi 233ef65f98 Pass image URL in completion blocks - step 1:
- deprecated block type `SDWebImageCompletedWithFinishedBlock`, replaced with `SDWebImageCompletionWithFinishedBlock` that contains NSURL* param
- deprecated SDWebImageManager `-downloadWithURL:options:progress:completed:` method. Replaced with `downloadImageWithURL:options:progress:completed:` that uses the `SDWebImageCompletionWithFinishedBlock ` as completion block type
- created Deprecated category for SDWebImageManager containing the old method
- replaced the usages of the deprecated items with the new ones
2014-06-19 11:10:38 +03:00
robertmryan f63a45add6 Adjusted completion logic in prefetcher, as the old implementation would finish prematurely if any requests were skipped.
Also adjusted documentation in headers to make it clear that the `finishedCount` includes both successful and unsuccessful requests.
2014-06-11 02:36:47 -04:00
利辺羅エルネスト 29302f49b3 Improve logging and fix arm64 warnings when printing integers with %d 2014-05-21 17:15:01 +09:00
Chang Luo 1f202ed7a3 Port Max's crash fix to my 3.6 fork 2014-04-16 16:06:22 -07:00
Michael Henderson f2546c7333 Check progressBlock is not nil before executing. 2014-03-04 14:10:50 +10:00
burakkilic c04e4efbf1 Update SDWebImagePrefetecher.m
I added "+ self.skippedCount" because it never completes if there are skipped operations.
2014-02-14 11:56:09 +02:00
burakkilic 159f08279a Update SDWebImagePrefetecher.m
I added progress block that I need.
2014-02-14 11:38:20 +02:00
Fabrice Aneche bdea43aec1 Dot-notation should always be used for accessing and mutating properties. Bracket notation is preferred in all other instances 2014-01-06 17:30:34 -08:00
Fabrice Aneche 6dc02bd8f7 reformat code (appcode) 2014-01-06 17:12:24 -08:00
Pieter Claerhout 51be4e298c Code cleanup. 2013-12-06 16:53:22 +01:00
Pieter Claerhout 1a917d8239 Added a delegate for the web image prefetched. 2013-12-06 16:21:00 +01:00
robertmryan 8b0bd16f18 Only perform `NSLog` statements if `SD_VERBOSE` is defined 2013-11-08 23:03:41 -05:00
Cédric Luthi 0b5291517f Fix completionBlock setter semantics
Using `SDDispatchQueueSetterSementics`, which might be `assign` for a block is a terrible idea.
2013-04-17 16:31:04 +03:00
Olivier Poitrey 350c0bea9a Add completion block support to `SDWebImagePrefetcher` (fix #127) 2013-02-17 02:43:46 +01:00
Olivier Poitrey 10c44577f6 Fix SDWebImagePrefetcher maxConcurrentDownloads property 2012-11-20 14:49:27 +01:00
Alex Barlow 44c6224763 Fix bug in SDWebImagePrefetcher where startPrefetchingAtIndex would never be called due to is always being 0 2012-11-20 14:45:34 +01:00
Matej Bukovinski 2e8c02556a Passing the exact cache type in the completion block.
- none, disk and memory
- can still be used as a bool (if true there was a cache hit)
2012-11-19 15:55:09 +01:00
Olivier Poitrey 2904559f54 Fix progressive mode 2012-11-06 18:14:22 +01:00
Olivier Poitrey 2227266c41 First beta of SDWebImage 3.0
This version is a rewrite of the lib using iOS 5.0 as minimum target.
The lib as thus been refactored to use blocks/GCD from the ground up.
As a consequence, all delegate code style has been removed. The result
is a lot less lines of code and more flexibility.
2012-11-04 10:09:10 +01:00
Olivier Poitrey b6e0630b17 Fix some typos/misses (fix #119) 2012-05-14 08:45:09 +02:00
Olivier Poitrey 5aa5b46952 Merge pull request #118 from jcole/master
Allows you to set SDWebImageOptions for SDWebImageOptions.  Defaults to SDWebImageLowPriority.
2012-05-11 17:34:26 -07:00
Jeff Cole 35b6553eac Allows SDWebImagePrefetcher options to be set set. Defaults to SDWebImageLowPriority. 2012-05-11 18:44:37 -04:00
Olivier Poitrey b52f85b31f Merge branch 'rebasedMaster' of https://github.com/cbowns/SDWebImage into cbowns-rebasedMaster 2012-05-12 00:26:55 +02:00
Olivier Poitrey dd5f15055d Move all source to a subdirectory to comply with XCode 4 standards 2012-05-09 12:37:35 +02:00