mirror of
https://github.com/metabolist/metatext
synced 2024-12-17 20:10:23 +01:00
Set retry and continue in background image options
This commit is contained in:
parent
19963de055
commit
e245569e1a
@ -17,6 +17,14 @@ extension ImageCacheConfiguration {
|
||||
SDImageCache.defaultDiskCacheDirectory = Self.imageCacheDirectoryURL?.path
|
||||
ImageDiskCache.service = try ImageSerializationService(environment: environment)
|
||||
SDImageCacheConfig.default.diskCacheClass = ImageDiskCache.self
|
||||
SDWebImageManager.shared.optionsProcessor = SDWebImageOptionsProcessor { _, options, context in
|
||||
var mutableOptions = options
|
||||
|
||||
mutableOptions.insert(.retryFailed)
|
||||
mutableOptions.insert(.continueInBackground)
|
||||
|
||||
return SDWebImageOptionsResult(options: options, context: context)
|
||||
}
|
||||
|
||||
if let legacyImageCacheDirectoryURL = Self.legacyImageCacheDirectoryURL,
|
||||
FileManager.default.fileExists(atPath: legacyImageCacheDirectoryURL.path) {
|
||||
|
Loading…
Reference in New Issue
Block a user