File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
SDWebImageSwiftUI/Classes Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ public struct WebImage : View {
6161 /// A observed object to pass through the image configuration to player
6262 @ObservedObject var imageConfiguration = WebImageConfiguration ( )
6363
64- @ObservedObject var imagePlayer = ImagePlayer ( )
64+ // FIXME: Use SwiftUI StateObject and remove onPlatformAppear once drop iOS 13 support
65+ @Backport . StateObject var imagePlayer = ImagePlayer ( )
6566
6667 // FIXME: Use SwiftUI StateObject and remove onPlatformAppear once drop iOS 13 support
6768 @Backport . StateObject var imageManager = ImageManager ( )
@@ -219,7 +220,7 @@ public struct WebImage : View {
219220 // Don't use `Group` because it will trigger `.onAppear` and `.onDisappear` when condition view removed, treat placeholder as an entire component
220221 if let placeholder = placeholder {
221222 // If use `.delayPlaceholder`, the placeholder is applied after loading failed, hide during loading :)
222- if imageModel. webOptions. contains ( . delayPlaceholder) && imageManager. indicatorStatus . isLoading {
223+ if imageModel. webOptions. contains ( . delayPlaceholder) && imageManager. error == nil {
223224 return AnyView ( configure ( image: . empty) )
224225 } else {
225226 return placeholder
You can’t perform that action at this time.
0 commit comments