Authored by DreamPiggy

Deprecate the sd_setImageWithPreviousCachedImageWithURL with the specify options…

… to achieve this usage
@@ -155,7 +155,9 @@ @@ -155,7 +155,9 @@
155 completed:(nullable SDExternalCompletionBlock)completedBlock; 155 completed:(nullable SDExternalCompletionBlock)completedBlock;
156 156
157 /** 157 /**
158 - * Set the imageView `image` with an `url` and optionally a placeholder image. 158 + * Set the imageView `image` with an `url` and custom options. The placeholder image is from previous cached image and will use the provided one instead if the query failed.
  159 + * This method was designed to ensure that placeholder and query cache process happened in the same runloop to avoid flashing on cell during two `setImage:` call. But it's really misunderstanding and deprecated.
  160 + * This can be done by using `sd_setImageWithURL:` with `SDWebImageQueryDiskSync`. But take care that if the memory cache missed, query disk cache synchronously may reduce the frame rate
159 * 161 *
160 * The download is asynchronous and cached. 162 * The download is asynchronous and cached.
161 * 163 *
@@ -169,12 +171,13 @@ @@ -169,12 +171,13 @@
169 * is nil and the second parameter may contain an NSError. The third parameter is a Boolean 171 * is nil and the second parameter may contain an NSError. The third parameter is a Boolean
170 * indicating if the image was retrieved from the local cache or from the network. 172 * indicating if the image was retrieved from the local cache or from the network.
171 * The fourth parameter is the original image url. 173 * The fourth parameter is the original image url.
  174 + * @deprecated consider using `SDWebImageQueryDiskSync` options with `sd_setImageWithURL:` instead
172 */ 175 */
173 - (void)sd_setImageWithPreviousCachedImageWithURL:(nullable NSURL *)url 176 - (void)sd_setImageWithPreviousCachedImageWithURL:(nullable NSURL *)url
174 placeholderImage:(nullable UIImage *)placeholder 177 placeholderImage:(nullable UIImage *)placeholder
175 options:(SDWebImageOptions)options 178 options:(SDWebImageOptions)options
176 progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock 179 progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock
177 - completed:(nullable SDExternalCompletionBlock)completedBlock; 180 + completed:(nullable SDExternalCompletionBlock)completedBlock __deprecated_msg("This method is misunderstanding and deprecated, consider using `SDWebImageQueryDiskSync` options with `sd_setImageWithURL:` instead");
178 181
179 #if SD_UIKIT 182 #if SD_UIKIT
180 183