Skip to content

Commit

Permalink
Fix YYCache issue with SDWebImage 5.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dreampiggy committed Apr 11, 2023
1 parent 97d3b55 commit 9c42cce
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ @implementation YYCache (SDAdditions)
if (options & SDWebImagePreloadAllFrames) cacheOptions |= SDImageCachePreloadAllFrames;
if (options & SDWebImageMatchAnimatedImageClass) cacheOptions |= SDImageCacheMatchAnimatedImageClass;

return [self queryImageForKey:key cacheOptions:cacheOptions context:context cacheType:SDImageCacheTypeAll completion:doneBlock];
return [self queryCacheOperationForKey:key options:cacheOptions context:context cacheType:queryCacheType done:doneBlock];
}

- (id<SDWebImageOperation>)queryImageForKey:(NSString *)key cacheOptions:(SDImageCacheOptions)options context:(SDWebImageContext *)context cacheType:(SDImageCacheType)queryCacheType completion:(SDImageCacheQueryCompletionBlock)doneBlock {
- (id<SDWebImageOperation>)queryCacheOperationForKey:(nullable NSString *)key options:(SDImageCacheOptions)options context:(nullable SDWebImageContext *)context cacheType:(SDImageCacheType)queryCacheType done:(nullable SDImageCacheQueryCompletionBlock)doneBlock {
if (!key) {
if (doneBlock) {
doneBlock(nil, nil, SDImageCacheTypeNone);
Expand Down

0 comments on commit 9c42cce

Please sign in to comment.