feat(creator-community): 이미지 표시되지 않던 버그 수정

- 프로필 이미지 - DownsampledKFImage. 적용
- 게시물 이미지 - AnimatedImage -> WebImage로 변경
This commit is contained in:
Yu Sung
2025-10-23 19:48:32 +09:00
parent 43d73058d6
commit 127f7c75f3
3 changed files with 21 additions and 35 deletions

View File

@@ -27,22 +27,16 @@ struct CreatorCommunityCommentItemView: View {
ZStack(alignment: .topTrailing) {
VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 6.7) {
KFImage(URL(string: commentItem.profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 40,
height: 40
)
)
.resizable()
.frame(width: 40, height: 40)
.clipShape(Circle())
.onTapGesture {
if UserDefaults.int(forKey: .userId) != commentItem.writerId {
onClickProfile(commentItem.writerId)
}
DownsampledKFImage(
url: URL(string: commentItem.profileUrl),
size: CGSize(width: 40, height: 40)
)
.clipShape(Circle())
.onTapGesture {
if UserDefaults.int(forKey: .userId) != commentItem.writerId {
onClickProfile(commentItem.writerId)
}
}
VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 6.7) {

View File

@@ -77,12 +77,11 @@ struct CreatorCommunityCommentListView: View {
}
HStack(spacing: 8) {
KFImage(URL(string: UserDefaults.string(forKey: .profileImage)))
.cancelOnDisappear(true)
.downsampling(size: CGSize(width: 33.3, height: 33.3))
.resizable()
.frame(width: 33.3, height: 33.3)
.clipShape(Circle())
DownsampledKFImage(
url: URL(string: UserDefaults.string(forKey: .profileImage)),
size: CGSize(width: 33.3, height: 33.3)
)
.clipShape(Circle())
HStack(spacing: 0) {
TextField("댓글을 입력해 보세요.", text: $viewModel.comment)

View File

@@ -47,17 +47,11 @@ struct CreatorCommunityAllItemView: View {
var body: some View {
VStack(spacing: 13.3) {
HStack(spacing: 0) {
KFImage(URL(string: item.creatorProfileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 40,
height: 40
)
)
.resizable()
.frame(width: 40, height: 40)
.clipShape(Circle())
DownsampledKFImage(
url: URL(string: item.creatorProfileUrl),
size: CGSize(width: 40,height: 40)
)
.clipShape(Circle())
VStack(alignment: .leading, spacing: 3) {
Text(item.creatorNickname)
@@ -100,10 +94,9 @@ struct CreatorCommunityAllItemView: View {
if item.price <= 0 || item.existOrdered {
if let imageUrl = item.imageUrl {
ZStack {
AnimatedImage(url: URL(string: imageUrl))
WebImage(url: URL(string: imageUrl))
.resizable()
.aspectRatio(contentMode: .fit)
.frame(maxWidth: .infinity)
.scaledToFit()
.clipped()
if let audioUrl = item.audioUrl {