perf: remove zstack on profile pictures

helps a bit? I think?
This commit is contained in:
William Casarin
2023-09-10 18:23:30 -07:00
parent 76a6dbc406
commit 36acdf420e

View File

@@ -45,9 +45,6 @@ struct InnerProfilePicView: View {
} }
var body: some View { var body: some View {
ZStack {
Color(uiColor: .systemBackground)
KFAnimatedImage(url) KFAnimatedImage(url)
.imageContext(.pfp, disable_animation: disable_animation) .imageContext(.pfp, disable_animation: disable_animation)
.onFailure(fallbackUrl: fallbackUrl, cacheKey: url?.absoluteString) .onFailure(fallbackUrl: fallbackUrl, cacheKey: url?.absoluteString)
@@ -59,13 +56,13 @@ struct InnerProfilePicView: View {
Placeholder Placeholder
} }
.scaledToFill() .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