@@ -69,9 +69,7 @@ public struct WebImage : View {
69
69
if imageManager. image != nil {
70
70
if isAnimating && !self . imageManager. isIncremental {
71
71
if currentFrame != nil {
72
- configurations. reduce ( Image ( platformImage: currentFrame!) ) { ( previous, configuration) in
73
- configuration ( previous)
74
- }
72
+ configure ( image: Image ( platformImage: currentFrame!) )
75
73
. onAppear {
76
74
self . imagePlayer? . startPlaying ( )
77
75
}
@@ -86,22 +84,16 @@ public struct WebImage : View {
86
84
}
87
85
}
88
86
} else {
89
- configurations. reduce ( Image ( platformImage: imageManager. image!) ) { ( previous, configuration) in
90
- configuration ( previous)
91
- }
87
+ configure ( image: Image ( platformImage: imageManager. image!) )
92
88
. onReceive ( imageManager. $image) { image in
93
89
self . setupPlayer ( image: image)
94
90
}
95
91
}
96
92
} else {
97
93
if currentFrame != nil {
98
- configurations. reduce ( Image ( platformImage: currentFrame!) ) { ( previous, configuration) in
99
- configuration ( previous)
100
- }
94
+ configure ( image: Image ( platformImage: currentFrame!) )
101
95
} else {
102
- configurations. reduce ( Image ( platformImage: imageManager. image!) ) { ( previous, configuration) in
103
- configuration ( previous)
104
- }
96
+ configure ( image: Image ( platformImage: imageManager. image!) )
105
97
}
106
98
}
107
99
} else {
@@ -268,9 +260,7 @@ extension WebImage {
268
260
/// - Parameter image: A Image view that describes the placeholder.
269
261
public func placeholder( _ image: Image ) -> WebImage {
270
262
return placeholder {
271
- configurations. reduce ( image) { ( previous, configuration) in
272
- configuration ( previous)
273
- }
263
+ configure ( image: image)
274
264
}
275
265
}
276
266
0 commit comments