mirror of
https://github.com/zhigang1992/Kingfisher.git
synced 2026-04-30 13:02:33 +08:00
Potential Fix for SwiftUI placeholder issue
This commit is contained in:
@@ -38,11 +38,6 @@ struct KFImageRenderer<HoldingView> : View where HoldingView: KFImageHoldingView
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
context.configurations
|
||||
.reduce(HoldingView.created(from: binder.loadedImage, context: context)) {
|
||||
current, config in config(current)
|
||||
}
|
||||
.opacity(binder.loaded ? 1.0 : 0.0)
|
||||
if binder.loadedImage == nil {
|
||||
Group {
|
||||
if let placeholder = context.placeholder, let view = placeholder(binder.progress) {
|
||||
@@ -68,6 +63,11 @@ struct KFImageRenderer<HoldingView> : View where HoldingView: KFImageHoldingView
|
||||
}
|
||||
}
|
||||
}
|
||||
context.configurations
|
||||
.reduce(HoldingView.created(from: binder.loadedImage, context: context)) {
|
||||
current, config in config(current)
|
||||
}
|
||||
.opacity(binder.loaded ? 1.0 : 0.0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user