Fix Expanding Profile Picture (nosestr bug)

Changelog-Fixed: Fix expanding profile picture (nosestr bug)
This commit is contained in:
Joel Klabo
2022-12-31 14:07:34 -08:00
committed by William Casarin
parent 6f5f86114b
commit 759ba398cc

View File

@@ -33,8 +33,6 @@ func pfp_line_width(_ h: Highlight) -> CGFloat {
}
struct InnerProfilePicView: View {
@Environment(\.redactionReasons) private var reasons
let url: URL?
let pubkey: String
let size: CGFloat
@@ -54,21 +52,17 @@ struct InnerProfilePicView: View {
var body: some View {
Group {
if reasons.isEmpty {
KFAnimatedImage(url)
.configure { view in
view.framePreloadCount = 1
}
.placeholder { _ in
Placeholder
}
.cacheOriginalImage()
.scaleFactor(UIScreen.main.scale)
.loadDiskFileSynchronously()
.fade(duration: 0.1)
} else {
KFImage(url)
}
KFAnimatedImage(url)
.configure { view in
view.framePreloadCount = 1
}
.placeholder { _ in
Placeholder
}
.cacheOriginalImage()
.scaleFactor(UIScreen.main.scale)
.loadDiskFileSynchronously()
.fade(duration: 0.1)
}
.frame(width: size, height: size)
.clipShape(Circle())