KFImage를 이용하여 불러오는 이미지 다운샘플링

This commit is contained in:
Yu Sung 2024-10-11 18:16:24 +09:00
parent eba9e4dec2
commit 9a461f14ad
64 changed files with 527 additions and 0 deletions

View File

@ -21,6 +21,13 @@ struct ContentNewAllItemView: View {
VStack(alignment: .leading, spacing: 8) { VStack(alignment: .leading, spacing: 8) {
ZStack(alignment: .bottom) { ZStack(alignment: .bottom) {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: width,
height: width
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: width, height: width, alignment: .top) .frame(width: width, height: width, alignment: .top)
@ -76,6 +83,13 @@ struct ContentNewAllItemView: View {
HStack(spacing: 5.3) { HStack(spacing: 5.3) {
KFImage(URL(string: item.creatorProfileImageUrl)) KFImage(URL(string: item.creatorProfileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 21.3,
height: 21.3
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 21.3, height: 21.3) .frame(width: 21.3, height: 21.3)

View File

@ -49,6 +49,13 @@ struct ContentRankingAllView: View {
} label: { } label: {
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 66.7,
height: 66.7
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 66.7, height: 66.7, alignment: .top) .frame(width: 66.7, height: 66.7, alignment: .top)

View File

@ -17,6 +17,8 @@ struct ContentListItemView: View {
HStack(spacing: 0) { HStack(spacing: 0) {
ZStack(alignment: .topLeading) { ZStack(alignment: .topLeading) {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(size: CGSize(width: 66.7, height: 66.7))
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 66.7, height: 66.7, alignment: .top) .frame(width: 66.7, height: 66.7, alignment: .top)

View File

@ -47,6 +47,13 @@ struct ContentCreateSelectThemeView: View {
ForEach(viewModel.themes, id: \.self) { theme in ForEach(viewModel.themes, id: \.self) { theme in
VStack(spacing: 16.7) { VStack(spacing: 16.7) {
KFImage(URL(string: theme.image)) KFImage(URL(string: theme.image))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 60,
height: 60
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 60, height: 60, alignment: .top) .frame(width: 60, height: 60, alignment: .top)

View File

@ -143,6 +143,13 @@ struct ContentCreateView: View {
HStack(spacing: 13.3) { HStack(spacing: 13.3) {
if let theme = viewModel.theme { if let theme = viewModel.theme {
KFImage(URL(string: theme.image)) KFImage(URL(string: theme.image))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 33.3,
height: 33.3
)
)
.resizable() .resizable()
.frame(width: 33.3, height: 33.3) .frame(width: 33.3, height: 33.3)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -28,6 +28,13 @@ struct AudioContentCommentItemView: View {
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 6.7) { HStack(spacing: 6.7) {
KFImage(URL(string: commentItem.profileUrl)) KFImage(URL(string: commentItem.profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 40,
height: 40
)
)
.resizable() .resizable()
.frame(width: 40, height: 40) .frame(width: 40, height: 40)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -15,6 +15,13 @@ struct ContentDetailAnotherItemView: View {
var body: some View { var body: some View {
VStack(alignment: .leading, spacing: 8) { VStack(alignment: .leading, spacing: 8) {
KFImage(URL(string: item.coverUrl)) KFImage(URL(string: item.coverUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 93.3,
height: 93.3
)
)
.resizable() .resizable()
.frame(width: 93.3, height: 93.3, alignment: .center) .frame(width: 93.3, height: 93.3, alignment: .center)
.clipped() .clipped()

View File

@ -17,6 +17,13 @@ struct ContentDetailCreatorProfileView: View {
var body: some View { var body: some View {
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: creator.profileImageUrl)) KFImage(URL(string: creator.profileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 26.7,
height: 26.7
)
)
.resizable() .resizable()
.frame(width: 26.7, height: 26.7) .frame(width: 26.7, height: 26.7)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -26,6 +26,13 @@ struct ContentDetailPlayView: View {
VStack(alignment: .leading, spacing: 8) { VStack(alignment: .leading, spacing: 8) {
ZStack { ZStack {
KFImage(URL(string: audioContent.coverImageUrl)) KFImage(URL(string: audioContent.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: screenSize().width - 26.7,
height: screenSize().width - 26.7
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame( .frame(

View File

@ -32,6 +32,13 @@ struct ContentOrderConfirmDialogView: View {
HStack(spacing: 11) { HStack(spacing: 11) {
ZStack(alignment: .topLeading) { ZStack(alignment: .topLeading) {
KFImage(URL(string: audioContent.coverImageUrl)) KFImage(URL(string: audioContent.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 88.7,
height: 88.7
)
)
.resizable() .resizable()
.frame(width: 88.7, height: 88.7, alignment: .center) .frame(width: 88.7, height: 88.7, alignment: .center)
.clipped() .clipped()
@ -54,6 +61,12 @@ struct ContentOrderConfirmDialogView: View {
HStack(spacing: 4.3) { HStack(spacing: 4.3) {
KFImage(URL(string: audioContent.creator.profileImageUrl)) KFImage(URL(string: audioContent.creator.profileImageUrl))
.cancelOnDisappear(true) .cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 13.3,
height: 13.3
)
)
.resizable() .resizable()
.frame(width: 13.3, height: 13.3) .frame(width: 13.3, height: 13.3)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -21,6 +21,13 @@ struct ContentMainBannerView: View {
let item = viewModel.bannerList[index] let item = viewModel.bannerList[index]
if let url = item.thumbnailImageUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) { if let url = item.thumbnailImageUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) {
KFImage(URL(string: url)) KFImage(URL(string: url))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: screenSize().width - 26.7,
height: (screenSize().width - 26.7) * 0.53
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame( .frame(
@ -42,6 +49,13 @@ struct ContentMainBannerView: View {
.cornerRadius(4.7) .cornerRadius(4.7)
} else { } else {
KFImage(URL(string: item.thumbnailImageUrl)) KFImage(URL(string: item.thumbnailImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: screenSize().width - 26.7,
height: (screenSize().width - 26.7) * 0.53
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame( .frame(

View File

@ -16,6 +16,13 @@ struct ContentMainItemView: View {
VStack(alignment: .leading, spacing: 8) { VStack(alignment: .leading, spacing: 8) {
ZStack(alignment: .topLeading) { ZStack(alignment: .topLeading) {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 133.3,
height: 133.3
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 133.3, height: 133.3, alignment: .top) .frame(width: 133.3, height: 133.3, alignment: .top)
@ -32,6 +39,13 @@ struct ContentMainItemView: View {
HStack(spacing: 5.3) { HStack(spacing: 5.3) {
KFImage(URL(string: item.creatorProfileImageUrl)) KFImage(URL(string: item.creatorProfileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 21.3,
height: 21.3
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 21.3, height: 21.3) .frame(width: 21.3, height: 21.3)

View File

@ -60,6 +60,13 @@ struct ContentMainRankingView: View {
let content = viewModel.contentRankingItemList[index] let content = viewModel.contentRankingItemList[index]
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: content.coverImageUrl)) KFImage(URL(string: content.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 60,
height: 60
)
)
.resizable() .resizable()
.frame(width: 60, height: 60) .frame(width: 60, height: 60)
.cornerRadius(2.7) .cornerRadius(2.7)

View File

@ -41,6 +41,13 @@ struct ContentModifyView: View {
.clipped() .clipped()
} else if let coverImageUrl = viewModel.coverImageUrl { } else if let coverImageUrl = viewModel.coverImageUrl {
KFImage(URL(string: coverImageUrl)) KFImage(URL(string: coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 107,
height: 107
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 107, height: 107) .frame(width: 107, height: 107)

View File

@ -16,6 +16,8 @@ struct SeriesContentListItemView: View {
VStack(spacing: 12) { VStack(spacing: 12) {
HStack(spacing: 11) { HStack(spacing: 11) {
KFImage(URL(string: item.coverImage)) KFImage(URL(string: item.coverImage))
.cancelOnDisappear(true)
.downsampling(size: CGSize(width: 66.7, height: 66.7))
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 66.7, height: 66.7) .frame(width: 66.7, height: 66.7)

View File

@ -50,6 +50,13 @@ struct SeriesDetailView: View {
.padding(.top, 94) .padding(.top, 94)
KFImage(URL(string: seriesDetail.coverImage)) KFImage(URL(string: seriesDetail.coverImage))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 400 * screenSize().width / 1080,
height: 564 * screenSize().width / 1080
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame( .frame(
@ -113,6 +120,13 @@ struct SeriesDetailView: View {
HStack(spacing: 5.3) { HStack(spacing: 5.3) {
KFImage(URL(string: seriesDetail.creator.profileImage)) KFImage(URL(string: seriesDetail.creator.profileImage))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 26.7,
height: 26.7
)
)
.resizable() .resizable()
.scaledToFit() .scaledToFit()
.clipShape(Circle()) .clipShape(Circle())

View File

@ -42,6 +42,13 @@ struct MemberProfileDialog: View {
.foregroundColor(Color.grayee) .foregroundColor(Color.grayee)
KFImage(URL(string: profile.profileImageUrl)) KFImage(URL(string: profile.profileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: screenSize().width - 66.7,
height: screenSize().width - 66.7
)
)
.resizable() .resizable()
.frame(maxWidth: screenSize().width - 66.7, maxHeight: screenSize().width - 66.7) .frame(maxWidth: screenSize().width - 66.7, maxHeight: screenSize().width - 66.7)
.aspectRatio(CGSize(width: 1, height: 1), contentMode: .fit) .aspectRatio(CGSize(width: 1, height: 1), contentMode: .fit)

View File

@ -28,6 +28,13 @@ struct CreatorCommunityCommentItemView: View {
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 6.7) { HStack(spacing: 6.7) {
KFImage(URL(string: commentItem.profileUrl)) KFImage(URL(string: commentItem.profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 40,
height: 40
)
)
.resizable() .resizable()
.frame(width: 40, height: 40) .frame(width: 40, height: 40)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -33,6 +33,13 @@ struct CreatorCommunityCommentView: View {
HStack(spacing: 8) { HStack(spacing: 8) {
if let comment = commentItem { if let comment = commentItem {
KFImage(URL(string: comment.profileUrl)) KFImage(URL(string: comment.profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 33.3,
height: 33.3
)
)
.resizable() .resizable()
.frame(width: 33.3, height: 33.3) .frame(width: 33.3, height: 33.3)
.clipShape(Circle()) .clipShape(Circle())
@ -44,6 +51,13 @@ struct CreatorCommunityCommentView: View {
.padding(.leading, 3) .padding(.leading, 3)
} else { } else {
KFImage(URL(string: UserDefaults.string(forKey: .profileImage))) KFImage(URL(string: UserDefaults.string(forKey: .profileImage)))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 33.3,
height: 33.3
)
)
.resizable() .resizable()
.frame(width: 33.3, height: 33.3) .frame(width: 33.3, height: 33.3)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -47,6 +47,13 @@ struct CreatorCommunityAllItemView: View {
VStack(spacing: 13.3) { VStack(spacing: 13.3) {
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: item.creatorProfileUrl)) KFImage(URL(string: item.creatorProfileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 40,
height: 40
)
)
.resizable() .resizable()
.frame(width: 40, height: 40) .frame(width: 40, height: 40)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -16,6 +16,13 @@ struct CreatorCommunityItemView: View {
VStack(alignment: .leading, spacing: 8) { VStack(alignment: .leading, spacing: 8) {
HStack(spacing: 11) { HStack(spacing: 11) {
KFImage(URL(string: item.creatorProfileUrl)) KFImage(URL(string: item.creatorProfileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 40,
height: 40
)
)
.resizable() .resizable()
.frame(width: 40, height: 40) .frame(width: 40, height: 40)
.clipShape(Circle()) .clipShape(Circle())
@ -42,6 +49,13 @@ struct CreatorCommunityItemView: View {
if let imageUrl = item.imageUrl { if let imageUrl = item.imageUrl {
KFImage(URL(string: imageUrl)) KFImage(URL(string: imageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 53.3,
height: 53.3
)
)
.resizable() .resizable()
.frame(width: 53.3, height: 53.3) .frame(width: 53.3, height: 53.3)
.cornerRadius(4.7) .cornerRadius(4.7)

View File

@ -43,6 +43,13 @@ struct CreatorCommunityModifyView: View {
.clipped() .clipped()
} else if let postImageUrl = viewModel.postImageUrl { } else if let postImageUrl = viewModel.postImageUrl {
KFImage(URL(string: postImageUrl)) KFImage(URL(string: postImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 107,
height: 107
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 107, height: 107) .frame(width: 107, height: 107)

View File

@ -18,6 +18,13 @@ struct FollowerListItemView: View {
VStack(spacing: 13.3) { VStack(spacing: 13.3) {
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: item.profileImage)) KFImage(URL(string: item.profileImage))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 60,
height: 60
)
)
.resizable() .resizable()
.frame(width: 60, height: 60) .frame(width: 60, height: 60)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -20,6 +20,13 @@ struct UserProfileCreatorView: View {
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
HStack(spacing: 20) { HStack(spacing: 20) {
KFImage(URL(string: creator.profileUrl)) KFImage(URL(string: creator.profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 90,
height: 90
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 90, height: 90) .frame(width: 90, height: 90)

View File

@ -44,6 +44,13 @@ struct UserProfileDonationView: View {
VStack(spacing: 6.7) { VStack(spacing: 6.7) {
ZStack { ZStack {
KFImage(URL(string: item.profileImage)) KFImage(URL(string: item.profileImage))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 60,
height: 60
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 60, height: 60, alignment: .top) .frame(width: 60, height: 60, alignment: .top)

View File

@ -23,6 +23,13 @@ struct UserProfileLiveView: View {
HStack(spacing: 20) { HStack(spacing: 20) {
ZStack(alignment: .topLeading) { ZStack(alignment: .topLeading) {
KFImage(URL(string: liveRoom.coverImageUrl)) KFImage(URL(string: liveRoom.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 80,
height: 116.7
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 80, height: 116.7, alignment: .center) .frame(width: 80, height: 116.7, alignment: .center)

View File

@ -18,6 +18,13 @@ struct FollowCreatorItemView: View {
VStack(spacing: 13.3) { VStack(spacing: 13.3) {
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: creator.profileImageUrl)) KFImage(URL(string: creator.profileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 60,
height: 60
)
)
.resizable() .resizable()
.frame(width: 60, height: 60) .frame(width: 60, height: 60)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -23,6 +23,13 @@ struct SectionEventBannerView: View {
let item = items[index] let item = items[index]
if let url = item.thumbnailImageUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) { if let url = item.thumbnailImageUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) {
KFImage(URL(string: url)) KFImage(URL(string: url))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: proxy.size.width,
height: proxy.size.height
)
)
.resizable() .resizable()
.frame(width: proxy.size.width, height: proxy.size.height, alignment: .center) .frame(width: proxy.size.width, height: proxy.size.height, alignment: .center)
.tag(index) .tag(index)
@ -35,6 +42,13 @@ struct SectionEventBannerView: View {
} }
} else { } else {
KFImage(URL(string: item.thumbnailImageUrl)) KFImage(URL(string: item.thumbnailImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: proxy.size.width,
height: proxy.size.height
)
)
.resizable() .resizable()
.frame(width: proxy.size.width, height: proxy.size.height, alignment: .center) .frame(width: proxy.size.width, height: proxy.size.height, alignment: .center)
.tag(index) .tag(index)

View File

@ -17,6 +17,13 @@ struct LiveNowAllItemView: View {
VStack(alignment: .leading, spacing: 8) { VStack(alignment: .leading, spacing: 8) {
ZStack { ZStack {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: itemWidth,
height: itemWidth * 144 / 102
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: itemWidth, height: itemWidth * 144 / 102, alignment: .center) .frame(width: itemWidth, height: itemWidth * 144 / 102, alignment: .center)
@ -100,6 +107,13 @@ struct LiveNowAllItemView: View {
HStack(spacing: 5.3) { HStack(spacing: 5.3) {
KFImage(URL(string: item.creatorProfileImage)) KFImage(URL(string: item.creatorProfileImage))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 21.3,
height: 21.3
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 21.3, height: 21.3, alignment: .center) .frame(width: 21.3, height: 21.3, alignment: .center)

View File

@ -19,6 +19,13 @@ struct LiveNowItemView: View {
VStack(alignment: .leading, spacing: 8) { VStack(alignment: .leading, spacing: 8) {
ZStack { ZStack {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: width,
height: height
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: width, height: height, alignment: .center) .frame(width: width, height: height, alignment: .center)
@ -80,6 +87,13 @@ struct LiveNowItemView: View {
HStack(spacing: 5.3) { HStack(spacing: 5.3) {
KFImage(URL(string: item.creatorProfileImage)) KFImage(URL(string: item.creatorProfileImage))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 21.3,
height: 21.3
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 21.3, height: 21.3, alignment: .center) .frame(width: 21.3, height: 21.3, alignment: .center)

View File

@ -32,6 +32,13 @@ struct SectionRecommendLiveView: View {
let item = items[index] let item = items[index]
if let url = item.imageUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) { if let url = item.imageUrl.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed) {
KFImage(URL(string: url)) KFImage(URL(string: url))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: screenSize().width - 26.7,
height: (screenSize().width - 26.7) * 0.53
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame( .frame(
@ -44,6 +51,13 @@ struct SectionRecommendLiveView: View {
.cornerRadius(4.7) .cornerRadius(4.7)
} else { } else {
KFImage(URL(string: item.imageUrl)) KFImage(URL(string: item.imageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: screenSize().width - 26.7,
height: (screenSize().width - 26.7) * 0.53
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame( .frame(

View File

@ -55,6 +55,13 @@ struct SectionRecommendChannelView: View {
VStack(spacing: 13.3) { VStack(spacing: 13.3) {
ZStack(alignment: .bottom) { ZStack(alignment: .bottom) {
KFImage(URL(string: item.profileImageUrl)) KFImage(URL(string: item.profileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: screenSize().width * 0.18,
height: screenSize().width * 0.18
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: screenSize().width * 0.18, height: screenSize().width * 0.18, alignment: .center) .frame(width: screenSize().width * 0.18, height: screenSize().width * 0.18, alignment: .center)

View File

@ -17,6 +17,13 @@ struct LiveReservationAllItemView: View {
HStack(spacing: 20) { HStack(spacing: 20) {
ZStack(alignment: .topLeading) { ZStack(alignment: .topLeading) {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 80,
height: 116
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 80, height: 116.7, alignment: .top) .frame(width: 80, height: 116.7, alignment: .top)

View File

@ -17,6 +17,13 @@ struct LiveReservationItemView: View {
HStack(spacing: 20) { HStack(spacing: 20) {
ZStack(alignment: .topLeading) { ZStack(alignment: .topLeading) {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 80,
height: 116
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 80, height: 116, alignment: .top) .frame(width: 80, height: 116, alignment: .top)

View File

@ -29,6 +29,13 @@ struct MyLiveReservationItemView: View {
HStack(alignment: .top, spacing: 20) { HStack(alignment: .top, spacing: 20) {
ZStack(alignment: .topLeading) { ZStack(alignment: .topLeading) {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 80,
height: 116
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 80, height: 116, alignment: .top) .frame(width: 80, height: 116, alignment: .top)

View File

@ -49,6 +49,13 @@ struct LiveRoomChatItemView: View {
} }
KFImage(URL(string: chatMessage.profileUrl)) KFImage(URL(string: chatMessage.profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 30,
height: 30
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 30, height: 30, alignment: .top) .frame(width: 30, height: 30, alignment: .top)

View File

@ -16,6 +16,13 @@ struct LiveRoomDonationChatItemView: View {
HStack(spacing: 13.3) { HStack(spacing: 13.3) {
ZStack(alignment: .bottomTrailing) { ZStack(alignment: .bottomTrailing) {
KFImage(URL(string: chatMessage.profileUrl)) KFImage(URL(string: chatMessage.profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 33.3,
height: 33.3
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 33.3, height: 33.3, alignment: .top) .frame(width: 33.3, height: 33.3, alignment: .top)

View File

@ -16,6 +16,13 @@ struct LiveRoomRouletteDonationChatItemView: View {
HStack(spacing: 13.3) { HStack(spacing: 13.3) {
ZStack(alignment: .bottomTrailing) { ZStack(alignment: .bottomTrailing) {
KFImage(URL(string: chatMessage.profileUrl)) KFImage(URL(string: chatMessage.profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 33.3,
height: 33.3
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 33.3, height: 33.3, alignment: .top) .frame(width: 33.3, height: 33.3, alignment: .top)

View File

@ -85,6 +85,13 @@ struct LiveRoomCreateView: View {
.cornerRadius(10) .cornerRadius(10)
} else if let coverImageUrl = viewModel.coverImageUrl { } else if let coverImageUrl = viewModel.coverImageUrl {
KFImage(URL(string: coverImageUrl)) KFImage(URL(string: coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 80,
height: 116.8
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 80, height: 116.8, alignment: .top) .frame(width: 80, height: 116.8, alignment: .top)

View File

@ -56,6 +56,13 @@ struct LiveRoomCreateTagView: View {
VStack(spacing: 16.7) { VStack(spacing: 16.7) {
ZStack { ZStack {
KFImage(URL(string: tag.image)) KFImage(URL(string: tag.image))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 60,
height: 60
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 60, height: 60, alignment: .top) .frame(width: 60, height: 60, alignment: .top)

View File

@ -138,6 +138,13 @@ struct LiveDetailView: View {
let manager = room.manager let manager = room.manager
KFImage(URL(string: manager.profileImageUrl)) KFImage(URL(string: manager.profileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 60,
height: 60
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 60, height: 60, alignment: .top) .frame(width: 60, height: 60, alignment: .top)
@ -427,6 +434,13 @@ struct LiveDetailView: View {
ForEach(room.participatingUsers, id: \.self) { user in ForEach(room.participatingUsers, id: \.self) { user in
VStack(spacing: 6.7) { VStack(spacing: 6.7) {
KFImage(URL(string: user.profileImageUrl)) KFImage(URL(string: user.profileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 46.7,
height: 46.7
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 46.7, height: 46.7, alignment: .top) .frame(width: 46.7, height: 46.7, alignment: .top)
@ -447,6 +461,13 @@ struct LiveDetailView: View {
ForEach(0..<userCount, id: \.self) { index in ForEach(0..<userCount, id: \.self) { index in
let user = room.participatingUsers[index] let user = room.participatingUsers[index]
KFImage(URL(string: user.profileImageUrl)) KFImage(URL(string: user.profileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 33.3,
height: 33.3
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 33.3, height: 33.3, alignment: .top) .frame(width: 33.3, height: 33.3, alignment: .top)

View File

@ -84,6 +84,13 @@ struct LiveRoomInfoEditDialog: View {
.cornerRadius(10) .cornerRadius(10)
} else if let coverImageUrl = coverImageUrl { } else if let coverImageUrl = coverImageUrl {
KFImage(URL(string: coverImageUrl)) KFImage(URL(string: coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 80,
height: 116.8
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 80, height: 116.8, alignment: .top) .frame(width: 80, height: 116.8, alignment: .top)

View File

@ -28,6 +28,13 @@ struct LiveRoomNoChattingDialogView: View {
HStack(spacing: 8) { HStack(spacing: 8) {
KFImage(URL(string: profileUrl)) KFImage(URL(string: profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 26.7,
height: 26.7
)
)
.resizable() .resizable()
.frame(width: 26.7, height: 26.7) .frame(width: 26.7, height: 26.7)

View File

@ -29,6 +29,13 @@ struct LiveRoomProfileDialog: View {
HStack(spacing: 13.3) { HStack(spacing: 13.3) {
KFImage(URL(string: profileInfo.profileImage)) KFImage(URL(string: profileInfo.profileImage))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 80,
height: 116.7
)
)
.resizable() .resizable()
.frame(width: 80, height: 116.7, alignment: .top) .frame(width: 80, height: 116.7, alignment: .top)
.clipped() .clipped()

View File

@ -49,6 +49,13 @@ struct LiveRoomProfileItemMasterView: View {
VStack(alignment: .leading, spacing: 20) { VStack(alignment: .leading, spacing: 20) {
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: profileUrl)) KFImage(URL(string: profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 60,
height: 60
)
)
.resizable() .resizable()
.frame(width: 60, height: 60) .frame(width: 60, height: 60)
.clipShape(Circle()) .clipShape(Circle())
@ -90,6 +97,13 @@ struct LiveRoomProfileItemUserView: View {
VStack(spacing: 10) { VStack(spacing: 10) {
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: profileUrl)) KFImage(URL(string: profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 46.7,
height: 46.7
)
)
.resizable() .resizable()
.frame(width: 46.7, height: 46.7) .frame(width: 46.7, height: 46.7)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -21,6 +21,13 @@ struct LiveRoomTopCreatorView: View {
var body: some View { var body: some View {
HStack(spacing: 5.3) { HStack(spacing: 5.3) {
KFImage(URL(string: profileImageUrl)) KFImage(URL(string: profileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 33.3,
height: 33.3
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 33.3, height: 33.3) .frame(width: 33.3, height: 33.3)

View File

@ -27,6 +27,13 @@ struct LiveRoomInfoCreatorView: View {
HStack(spacing: 5.3) { HStack(spacing: 5.3) {
ZStack(alignment: .center) { ZStack(alignment: .center) {
KFImage(URL(string: creatorProfileUrl)) KFImage(URL(string: creatorProfileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 33.3,
height: 33.3
)
)
.resizable() .resizable()
.frame(width: 33.3, height: 33.3) .frame(width: 33.3, height: 33.3)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -22,6 +22,13 @@ struct LiveRoomInfoSpeakerView: View {
VStack(spacing: 5) { VStack(spacing: 5) {
ZStack(alignment: .center) { ZStack(alignment: .center) {
KFImage(URL(string: profileUrl)) KFImage(URL(string: profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 25,
height: 25
)
)
.resizable() .resizable()
.frame(width: 25, height: 25) .frame(width: 25, height: 25)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -15,6 +15,13 @@ struct EventPopupDialogView: View {
var body: some View { var body: some View {
VStack(spacing: 13.3) { VStack(spacing: 13.3) {
KFImage(URL(string: eventPopup.popupImageUrl!)) KFImage(URL(string: eventPopup.popupImageUrl!))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: screenSize().width,
height: screenSize().width
)
)
.resizable() .resizable()
.frame(width: screenSize().width, height: screenSize().width) .frame(width: screenSize().width, height: screenSize().width)
.scaledToFill() .scaledToFill()

View File

@ -56,6 +56,13 @@ struct HomeView: View {
if contentPlayManager.isShowingMiniPlayer { if contentPlayManager.isShowingMiniPlayer {
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: contentPlayManager.coverImage)) KFImage(URL(string: contentPlayManager.coverImage))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 36.7,
height: 36.7
)
)
.resizable() .resizable()
.frame(width: 36.7, height: 36.7) .frame(width: 36.7, height: 36.7)
.cornerRadius(5.3) .cornerRadius(5.3)

View File

@ -43,6 +43,13 @@ struct TextMessageDetailView: View {
messageItem.senderProfileImageUrl messageItem.senderProfileImageUrl
) )
) )
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 26.7,
height: 26.7
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 26.7, height: 26.7, alignment: .top) .frame(width: 26.7, height: 26.7, alignment: .top)

View File

@ -38,6 +38,13 @@ struct SelectRecipientView: View {
ForEach(viewModel.users, id: \.self) { user in ForEach(viewModel.users, id: \.self) { user in
HStack(spacing: 13.3) { HStack(spacing: 13.3) {
KFImage(URL(string: user.profileImageUrl)) KFImage(URL(string: user.profileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 46.7,
height: 46.7
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 46.7, height: 46.7, alignment: .top) .frame(width: 46.7, height: 46.7, alignment: .top)

View File

@ -20,6 +20,13 @@ struct TextMessageItemView: View {
HStack(spacing: 13.3) { HStack(spacing: 13.3) {
KFImage(URL(string: profileUrl)) KFImage(URL(string: profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 46.7,
height: 46.7
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 46.7, height: 46.7, alignment: .top) .frame(width: 46.7, height: 46.7, alignment: .top)

View File

@ -33,6 +33,13 @@ struct VoiceMessageItemView: View {
VStack(spacing: 10) { VStack(spacing: 10) {
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: profileUrl)) KFImage(URL(string: profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 46.7,
height: 46.7
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 46.7, height: 46.7, alignment: .top) .frame(width: 46.7, height: 46.7, alignment: .top)

View File

@ -20,6 +20,13 @@ struct BlockedMemberListItemView: View {
VStack(spacing: 13.3) { VStack(spacing: 13.3) {
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: item.profileImageUrl)) KFImage(URL(string: item.profileImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 60,
height: 60
)
)
.resizable() .resizable()
.frame(width: 60, height: 60) .frame(width: 60, height: 60)
.clipShape(Circle()) .clipShape(Circle())

View File

@ -16,6 +16,13 @@ struct MyInfoCardView: View {
var body: some View { var body: some View {
HStack(spacing: 13.3) { HStack(spacing: 13.3) {
KFImage(URL(string: data.profileUrl)) KFImage(URL(string: data.profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 90,
height: 90
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 90, height: 90, alignment: .top) .frame(width: 90, height: 90, alignment: .top)

View File

@ -16,6 +16,13 @@ struct OrderListItemView: View {
VStack(spacing: 12) { VStack(spacing: 12) {
HStack(spacing: 10) { HStack(spacing: 10) {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 80,
height: 80
)
)
.resizable() .resizable()
.frame(width: 80, height: 80, alignment: .center) .frame(width: 80, height: 80, alignment: .center)
.clipped() .clipped()

View File

@ -292,6 +292,13 @@ struct ProfileUpdateView: View {
ZStack { ZStack {
if profileResponse.profileUrl.trimmingCharacters(in: .whitespaces).count > 0 { if profileResponse.profileUrl.trimmingCharacters(in: .whitespaces).count > 0 {
KFImage(URL(string: profileResponse.profileUrl)) KFImage(URL(string: profileResponse.profileUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 80,
height: 80
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 80, height: 80, alignment: .top) .frame(width: 80, height: 80, alignment: .top)

View File

@ -51,6 +51,13 @@ struct MemberTagView: View {
VStack(spacing: 16.7) { VStack(spacing: 16.7) {
ZStack { ZStack {
KFImage(URL(string: tag.image)) KFImage(URL(string: tag.image))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 60,
height: 60
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 60, height: 60, alignment: .top) .frame(width: 60, height: 60, alignment: .top)

View File

@ -72,6 +72,13 @@ struct LiveReservationCancelView: View {
} else { } else {
HStack(spacing: 20) { HStack(spacing: 20) {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 80,
height: 116.7
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 80, height: 116.7, alignment: .top) .frame(width: 80, height: 116.7, alignment: .top)

View File

@ -15,6 +15,13 @@ struct LiveReservationStatusItemView: View {
var body: some View { var body: some View {
HStack(spacing: 0) { HStack(spacing: 0) {
KFImage(URL(string: item.coverImageUrl)) KFImage(URL(string: item.coverImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: 80,
height: 116.7
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 80, height: 116.7, alignment: .top) .frame(width: 80, height: 116.7, alignment: .top)

View File

@ -21,6 +21,13 @@ struct EventListView: View {
VStack(spacing: 0) { VStack(spacing: 0) {
ForEach(viewModel.events, id: \.self) { event in ForEach(viewModel.events, id: \.self) { event in
KFImage(URL(string: event.thumbnailImageUrl)) KFImage(URL(string: event.thumbnailImageUrl))
.cancelOnDisappear(true)
.downsampling(
size: CGSize(
width: screenSize().width - 26.7,
height: (screenSize().width - 26.7) * 300 / 1000
)
)
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame( .frame(

View File

@ -18,6 +18,8 @@ struct SeriesListBigItemView: View {
VStack(alignment: .leading, spacing: 8) { VStack(alignment: .leading, spacing: 8) {
ZStack { ZStack {
KFImage(URL(string: item.coverImage)) KFImage(URL(string: item.coverImage))
.cancelOnDisappear(true)
.downsampling(size: CGSize(width: 116.7, height: 165))
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 116.7, height: 165, alignment: .center) .frame(width: 116.7, height: 165, alignment: .center)
@ -65,6 +67,8 @@ struct SeriesListBigItemView: View {
if isVisibleCreator { if isVisibleCreator {
HStack(spacing: 3) { HStack(spacing: 3) {
KFImage(URL(string: item.creator.profileImage)) KFImage(URL(string: item.creator.profileImage))
.cancelOnDisappear(true)
.downsampling(size: CGSize(width: 16, height: 16))
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: 16, height: 16, alignment: .center) .frame(width: 16, height: 16, alignment: .center)

View File

@ -18,6 +18,8 @@ struct SeriesListItemView: View {
VStack(alignment: .leading, spacing: 8) { VStack(alignment: .leading, spacing: 8) {
ZStack { ZStack {
KFImage(URL(string: item.coverImage)) KFImage(URL(string: item.coverImage))
.cancelOnDisappear(true)
.downsampling(size: CGSize(width: itemWidth, height: itemWidth * 432 / 306))
.resizable() .resizable()
.scaledToFill() .scaledToFill()
.frame(width: itemWidth, height: itemWidth * 432 / 306) .frame(width: itemWidth, height: itemWidth * 432 / 306)