Pārlūkot izejas kodu

fix: add @MainActor attribute to animation closure of custom transition

paul-han 1 gadu atpakaļ
vecāks
revīzija
9c9fc59276
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      Sources/Image/ImageTransition.swift

+ 1 - 1
Sources/Image/ImageTransition.swift

@@ -56,7 +56,7 @@ public enum ImageTransition: Sendable {
     ///    - completion: A block called when the transition animation finishes.
     case custom(duration: TimeInterval,
                  options: UIView.AnimationOptions,
-              animations: (@Sendable (UIImageView, UIImage) -> Void)?,
+              animations: (@Sendable @MainActor (UIImageView, UIImage) -> Void)?,
               completion: (@Sendable (Bool) -> Void)?)
     
     var duration: TimeInterval {