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 {
61
61
/// A observed object to pass through the image configuration to player
62
62
@ObservedObject var imageConfiguration = WebImageConfiguration ( )
63
63
64
- @ObservedObject var imagePlayer = ImagePlayer ( )
64
+ // FIXME: Use SwiftUI StateObject and remove onPlatformAppear once drop iOS 13 support
65
+ @Backport . StateObject var imagePlayer = ImagePlayer ( )
65
66
66
67
// FIXME: Use SwiftUI StateObject and remove onPlatformAppear once drop iOS 13 support
67
68
@Backport . StateObject var imageManager = ImageManager ( )
@@ -219,7 +220,7 @@ public struct WebImage : View {
219
220
// Don't use `Group` because it will trigger `.onAppear` and `.onDisappear` when condition view removed, treat placeholder as an entire component
220
221
if let placeholder = placeholder {
221
222
// 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 {
223
224
return AnyView ( configure ( image: . empty) )
224
225
} else {
225
226
return placeholder
You can’t perform that action at this time.
0 commit comments