Skip to content

Commit ad47b58

Browse files
committed
cancel image load if there are pending url request on AnimatedImage
1 parent 7d4030a commit ad47b58

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

SDWebImageSwiftUI/Classes/AnimatedImage.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ public struct AnimatedImage : PlatformViewRepresentable {
256256
}
257257

258258
static func dismantleView(_ view: AnimatedImageViewWrapper, coordinator: ()) {
259+
view.wrapped.sd_cancelCurrentImageLoad()
259260
#if os(macOS)
260261
view.wrapped.animates = false
261262
#else

0 commit comments

Comments
 (0)