File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,6 @@ public struct CachedAsyncImage<Content>: View where Content: View {
7979
8080 public var body : some View {
8181 content ( phase)
82- . animation ( transaction. animation)
8382 . task ( id: url) {
8483 await load ( url: url)
8584 }
@@ -212,20 +211,26 @@ public struct CachedAsyncImage<Content>: View where Content: View {
212211#if os(macOS)
213212 if let nsImage = NSImage ( data: data) {
214213 let image = Image ( nsImage: nsImage)
215- phase = . success( image)
214+ withAnimation ( transaction. animation) {
215+ phase = . success( image)
216+ }
216217 } else {
217218 throw AsyncImage< Content> . LoadingError( )
218219 }
219220#else
220221 if let uiImage = UIImage ( data: data) {
221222 let image = Image ( uiImage: uiImage)
222- phase = . success( image)
223+ withAnimation ( transaction. animation) {
224+ phase = . success( image)
225+ }
223226 } else {
224227 throw AsyncImage< Content> . LoadingError( )
225228 }
226229#endif
227230 } catch {
228- phase = . failure( error)
231+ withAnimation ( transaction. animation) {
232+ phase = . failure( error)
233+ }
229234 }
230235 }
231236}
You can’t perform that action at this time.
0 commit comments