Browse Source

Fix Expanding Profile Picture (nosestr bug)

Changelog-Fixed: Fix expanding profile picture (nosestr bug)
post-button-style
Joel Klabo 2 years ago
committed by William Casarin
parent
commit
759ba398cc
  1. 28
      damus/Views/ProfilePicView.swift

28
damus/Views/ProfilePicView.swift

@ -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())

Loading…
Cancel
Save