|
|
@@ -218,11 +218,8 @@ public class KingfisherManager {
|
|
|
if image != nil {
|
|
|
diskTaskCompletionHandler(image: image, error: nil, cacheType:cacheType, imageURL: URL)
|
|
|
} else if let options = options where options.onlyFromCache {
|
|
|
- diskTaskCompletionHandler(image: nil,
|
|
|
- error: NSError(domain: KingfisherErrorDomain, code: KingfisherError.NotCached.rawValue, userInfo: nil),
|
|
|
- cacheType:.None,
|
|
|
- imageURL: URL)
|
|
|
- return
|
|
|
+ let error = NSError(domain: KingfisherErrorDomain, code: KingfisherError.NotCached.rawValue, userInfo: nil)
|
|
|
+ diskTaskCompletionHandler(image: nil, error: error, cacheType:.None, imageURL: URL)
|
|
|
} else {
|
|
|
self.downloadAndCacheImageWithURL(URL,
|
|
|
forKey: key,
|
|
|
@@ -231,7 +228,8 @@ public class KingfisherManager {
|
|
|
completionHandler: diskTaskCompletionHandler,
|
|
|
options: options)
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
+ )
|
|
|
retrieveImageTask.diskRetrieveTask = diskTask
|
|
|
}
|
|
|
}
|