perf: remove zstack on profile pictures
helps a bit? I think?
This commit is contained in:
@@ -45,27 +45,24 @@ struct InnerProfilePicView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
KFAnimatedImage(url)
|
||||||
Color(uiColor: .systemBackground)
|
.imageContext(.pfp, disable_animation: disable_animation)
|
||||||
|
.onFailure(fallbackUrl: fallbackUrl, cacheKey: url?.absoluteString)
|
||||||
KFAnimatedImage(url)
|
.cancelOnDisappear(true)
|
||||||
.imageContext(.pfp, disable_animation: disable_animation)
|
.configure { view in
|
||||||
.onFailure(fallbackUrl: fallbackUrl, cacheKey: url?.absoluteString)
|
view.framePreloadCount = 3
|
||||||
.cancelOnDisappear(true)
|
}
|
||||||
.configure { view in
|
.placeholder { _ in
|
||||||
view.framePreloadCount = 3
|
Placeholder
|
||||||
}
|
}
|
||||||
.placeholder { _ in
|
.scaledToFill()
|
||||||
Placeholder
|
|
||||||
}
|
|
||||||
.scaledToFill()
|
|
||||||
}
|
|
||||||
.frame(width: size, height: size)
|
.frame(width: size, height: size)
|
||||||
.clipShape(Circle())
|
.clipShape(Circle())
|
||||||
.overlay(Circle().stroke(highlight_color(highlight), lineWidth: pfp_line_width(highlight)))
|
.overlay(Circle().stroke(highlight_color(highlight), lineWidth: pfp_line_width(highlight)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct ProfilePicView: View {
|
struct ProfilePicView: View {
|
||||||
let pubkey: Pubkey
|
let pubkey: Pubkey
|
||||||
let size: CGFloat
|
let size: CGFloat
|
||||||
|
|||||||
Reference in New Issue
Block a user