Просмотр исходного кода

Not assertion for default processor

onevcat 1 год назад
Родитель
Сommit
31002aafbb
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      Sources/Networking/ImageDownloader+LivePhoto.swift

+ 4 - 1
Sources/Networking/ImageDownloader+LivePhoto.swift

@@ -84,7 +84,10 @@ extension ImageDownloader {
         completionHandler: (@Sendable (Result<LivePhotoResourceLoadingResult, KingfisherError>) -> Void)? = nil
     ) -> DownloadTask {
         var checkedOptions = options
-        if options.processor != LivePhotoImageProcessor.default {
+        if options.processor == DefaultImageProcessor.default {
+            // The default processor is a default behavior so we replace it silently.
+            checkedOptions.processor = LivePhotoImageProcessor.default
+        } else if options.processor != LivePhotoImageProcessor.default {
             assertionFailure("[Kingfisher] Using of custom processors during loading of live photo resource is not supported.")
             checkedOptions.processor = LivePhotoImageProcessor.default
         }