@@ -309,8 +309,6 @@ public struct AnimatedImage : PlatformViewRepresentable {
309309 #endif
310310 context. coordinator. imageLoading. imageName = name
311311 view. wrapped. image = image
312- // Finished loading, sync
313- finishUpdateView ( view, context: context, image: image)
314312 }
315313
316314 private func updateViewForData( _ data: Data ? , view: AnimatedImageViewWrapper , context: Context ) {
@@ -324,8 +322,6 @@ public struct AnimatedImage : PlatformViewRepresentable {
324322 }
325323 context. coordinator. imageLoading. imageData = data
326324 view. wrapped. image = image
327- // Finished loading, sync
328- finishUpdateView ( view, context: context, image: image)
329325 }
330326
331327 private func updateViewForURL( _ url: URL ? , view: AnimatedImageViewWrapper , context: Context ) {
@@ -350,8 +346,6 @@ public struct AnimatedImage : PlatformViewRepresentable {
350346 setupIndicator ( view, context: context)
351347 loadImage ( view, context: context)
352348 }
353- // Finished loading, sync
354- finishUpdateView ( view, context: context, image: view. wrapped. image)
355349 }
356350
357351 func updateView( _ view: AnimatedImageViewWrapper , context: Context ) {
@@ -369,6 +363,9 @@ public struct AnimatedImage : PlatformViewRepresentable {
369363 break // impossible
370364 }
371365
366+ // Finished loading, sync
367+ finishUpdateView ( view, context: context, image: view. wrapped. image)
368+
372369 if let viewUpdateBlock = imageHandler. viewUpdateBlock {
373370 viewUpdateBlock ( view. wrapped, context)
374371 }
0 commit comments