feat: KFImage를 사용하는 곳에 .cancelOnDisappear(true) 옵션 추가
This commit is contained in:
		@@ -183,6 +183,7 @@ extension CharacterDetailView {
 | 
				
			|||||||
            if let imageUrl = viewModel.characterDetail?.imageUrl{
 | 
					            if let imageUrl = viewModel.characterDetail?.imageUrl{
 | 
				
			||||||
                // 배경 이미지
 | 
					                // 배경 이미지
 | 
				
			||||||
                KFImage(URL(string: imageUrl))
 | 
					                KFImage(URL(string: imageUrl))
 | 
				
			||||||
 | 
					                    .cancelOnDisappear(true)
 | 
				
			||||||
                    .resizable()
 | 
					                    .resizable()
 | 
				
			||||||
                    .scaledToFill()
 | 
					                    .scaledToFill()
 | 
				
			||||||
                    .frame(width: screenSize().width, height: screenSize().width, alignment: .top)
 | 
					                    .frame(width: screenSize().width, height: screenSize().width, alignment: .top)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -16,6 +16,7 @@ struct OriginalWorkDetailHeaderView: View {
 | 
				
			|||||||
        VStack(spacing: 0) {
 | 
					        VStack(spacing: 0) {
 | 
				
			||||||
            if let imageUrl = item.imageUrl {
 | 
					            if let imageUrl = item.imageUrl {
 | 
				
			||||||
                KFImage(URL(string: imageUrl))
 | 
					                KFImage(URL(string: imageUrl))
 | 
				
			||||||
 | 
					                    .cancelOnDisappear(true)
 | 
				
			||||||
                    .resizable()
 | 
					                    .resizable()
 | 
				
			||||||
                    .scaledToFill()
 | 
					                    .scaledToFill()
 | 
				
			||||||
                    .frame(width: 168, height: 168 * 432 / 306)
 | 
					                    .frame(width: 168, height: 168 * 432 / 306)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,6 +20,7 @@ struct OriginalWorkDetailView: View {
 | 
				
			|||||||
                ZStack(alignment: .top) {
 | 
					                ZStack(alignment: .top) {
 | 
				
			||||||
                    if let imageUrl = viewModel.response?.imageUrl {
 | 
					                    if let imageUrl = viewModel.response?.imageUrl {
 | 
				
			||||||
                        KFImage(URL(string: imageUrl))
 | 
					                        KFImage(URL(string: imageUrl))
 | 
				
			||||||
 | 
					                            .cancelOnDisappear(true)
 | 
				
			||||||
                            .resizable()
 | 
					                            .resizable()
 | 
				
			||||||
                            .scaledToFill()
 | 
					                            .scaledToFill()
 | 
				
			||||||
                            .frame(width: screenSize().width, height: (168 * 288 / 306) + 56)
 | 
					                            .frame(width: screenSize().width, height: (168 * 288 / 306) + 56)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,6 +39,7 @@ struct ChatRoomView: View {
 | 
				
			|||||||
                                    .resizable()
 | 
					                                    .resizable()
 | 
				
			||||||
                                    .scaledToFit()
 | 
					                                    .scaledToFit()
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
 | 
					                            .cancelOnDisappear(true)
 | 
				
			||||||
                            .resizable()
 | 
					                            .resizable()
 | 
				
			||||||
                            .frame(width: 36, height: 36)
 | 
					                            .frame(width: 36, height: 36)
 | 
				
			||||||
                            .clipShape(Circle())
 | 
					                            .clipShape(Circle())
 | 
				
			||||||
@@ -339,6 +340,7 @@ struct ChatRoomBgView: View {
 | 
				
			|||||||
            ZStack {
 | 
					            ZStack {
 | 
				
			||||||
                if let url = url {
 | 
					                if let url = url {
 | 
				
			||||||
                    KFImage(URL(string: url))
 | 
					                    KFImage(URL(string: url))
 | 
				
			||||||
 | 
					                        .cancelOnDisappear(true)
 | 
				
			||||||
                        .resizable()
 | 
					                        .resizable()
 | 
				
			||||||
                        .scaledToFill()
 | 
					                        .scaledToFill()
 | 
				
			||||||
                        .frame(width: width, height: height)
 | 
					                        .frame(width: width, height: height)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,6 +77,7 @@ struct AiMessageItemView: View {
 | 
				
			|||||||
                            .resizable()
 | 
					                            .resizable()
 | 
				
			||||||
                            .scaledToFit()
 | 
					                            .scaledToFit()
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 | 
					                    .cancelOnDisappear(true)
 | 
				
			||||||
                    .resizable()
 | 
					                    .resizable()
 | 
				
			||||||
                    .frame(width: 30, height: 30)
 | 
					                    .frame(width: 30, height: 30)
 | 
				
			||||||
                    .clipShape(Circle())
 | 
					                    .clipShape(Circle())
 | 
				
			||||||
@@ -100,6 +101,7 @@ struct AiMessageItemView: View {
 | 
				
			|||||||
                        
 | 
					                        
 | 
				
			||||||
                        ZStack {
 | 
					                        ZStack {
 | 
				
			||||||
                            KFImage(URL(string: imageUrl))
 | 
					                            KFImage(URL(string: imageUrl))
 | 
				
			||||||
 | 
					                                .cancelOnDisappear(true)
 | 
				
			||||||
                                .resizable()
 | 
					                                .resizable()
 | 
				
			||||||
                                .scaledToFill() // 비율 유지하며 프레임을 채움
 | 
					                                .scaledToFill() // 비율 유지하며 프레임을 채움
 | 
				
			||||||
                            
 | 
					                            
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,6 +29,7 @@ struct TypingIndicatorItemView: View {
 | 
				
			|||||||
                        .resizable()
 | 
					                        .resizable()
 | 
				
			||||||
                        .scaledToFit()
 | 
					                        .scaledToFit()
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					                .cancelOnDisappear(true)
 | 
				
			||||||
                .resizable()
 | 
					                .resizable()
 | 
				
			||||||
                .frame(width: 30, height: 30)
 | 
					                .frame(width: 30, height: 30)
 | 
				
			||||||
                .clipShape(Circle())
 | 
					                .clipShape(Circle())
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,6 +20,7 @@ struct ContentDetailPreviousNextContentButtonView: View {
 | 
				
			|||||||
                if let previousContent = previousContent {
 | 
					                if let previousContent = previousContent {
 | 
				
			||||||
                    HStack(alignment: .top, spacing: 5.3) {
 | 
					                    HStack(alignment: .top, spacing: 5.3) {
 | 
				
			||||||
                        KFImage(URL(string: previousContent.coverUrl))
 | 
					                        KFImage(URL(string: previousContent.coverUrl))
 | 
				
			||||||
 | 
					                            .cancelOnDisappear(true)
 | 
				
			||||||
                            .resizable()
 | 
					                            .resizable()
 | 
				
			||||||
                            .frame(width: 33.3, height: 33.3)
 | 
					                            .frame(width: 33.3, height: 33.3)
 | 
				
			||||||
                            .cornerRadius(5.3)
 | 
					                            .cornerRadius(5.3)
 | 
				
			||||||
@@ -58,6 +59,7 @@ struct ContentDetailPreviousNextContentButtonView: View {
 | 
				
			|||||||
                if let nextContent = nextContent {
 | 
					                if let nextContent = nextContent {
 | 
				
			||||||
                    HStack(alignment: .top, spacing: 5.3) {
 | 
					                    HStack(alignment: .top, spacing: 5.3) {
 | 
				
			||||||
                        KFImage(URL(string: nextContent.coverUrl))
 | 
					                        KFImage(URL(string: nextContent.coverUrl))
 | 
				
			||||||
 | 
					                            .cancelOnDisappear(true)
 | 
				
			||||||
                            .resizable()
 | 
					                            .resizable()
 | 
				
			||||||
                            .frame(width: 33.3, height: 33.3)
 | 
					                            .frame(width: 33.3, height: 33.3)
 | 
				
			||||||
                            .cornerRadius(5.3)
 | 
					                            .cornerRadius(5.3)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -25,6 +25,7 @@ struct SeriesDetailView: View {
 | 
				
			|||||||
                
 | 
					                
 | 
				
			||||||
                if let seriesDetail = viewModel.seriesDetail {
 | 
					                if let seriesDetail = viewModel.seriesDetail {
 | 
				
			||||||
                    KFImage(URL(string: seriesDetail.coverImage))
 | 
					                    KFImage(URL(string: seriesDetail.coverImage))
 | 
				
			||||||
 | 
					                        .cancelOnDisappear(true)
 | 
				
			||||||
                        .resizable()
 | 
					                        .resizable()
 | 
				
			||||||
                        .scaledToFit()
 | 
					                        .scaledToFit()
 | 
				
			||||||
                        .frame(maxWidth: .infinity)
 | 
					                        .frame(maxWidth: .infinity)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,6 +17,7 @@ struct RecommendChannelContentItemView: View {
 | 
				
			|||||||
    var body: some View {
 | 
					    var body: some View {
 | 
				
			||||||
        HStack(spacing: 16) {
 | 
					        HStack(spacing: 16) {
 | 
				
			||||||
            KFImage(URL(string: item.thumbnailImageUrl))
 | 
					            KFImage(URL(string: item.thumbnailImageUrl))
 | 
				
			||||||
 | 
					                .cancelOnDisappear(true)
 | 
				
			||||||
                .resizable()
 | 
					                .resizable()
 | 
				
			||||||
                .frame(width: 60, height: 60)
 | 
					                .frame(width: 60, height: 60)
 | 
				
			||||||
                .cornerRadius(12)
 | 
					                .cornerRadius(12)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -18,6 +18,7 @@ struct RecommendChannelItemView: View {
 | 
				
			|||||||
        VStack(alignment: .leading, spacing: 12) {
 | 
					        VStack(alignment: .leading, spacing: 12) {
 | 
				
			||||||
            HStack(spacing: 6) {
 | 
					            HStack(spacing: 6) {
 | 
				
			||||||
                KFImage(URL(string: item.creatorProfileImageUrl))
 | 
					                KFImage(URL(string: item.creatorProfileImageUrl))
 | 
				
			||||||
 | 
					                    .cancelOnDisappear(true)
 | 
				
			||||||
                    .resizable()
 | 
					                    .resizable()
 | 
				
			||||||
                    .aspectRatio(contentMode: .fill)
 | 
					                    .aspectRatio(contentMode: .fill)
 | 
				
			||||||
                    .frame(width: 80, height: 80, alignment: .top)
 | 
					                    .frame(width: 80, height: 80, alignment: .top)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -83,6 +83,7 @@ struct LiveRoomUserProfileDialogView: View {
 | 
				
			|||||||
                        .padding(.top, 21.3)
 | 
					                        .padding(.top, 21.3)
 | 
				
			||||||
                        
 | 
					                        
 | 
				
			||||||
                        KFImage(URL(string: userProfile.profileUrl))
 | 
					                        KFImage(URL(string: userProfile.profileUrl))
 | 
				
			||||||
 | 
					                            .cancelOnDisappear(true)
 | 
				
			||||||
                            .resizable()
 | 
					                            .resizable()
 | 
				
			||||||
                            .aspectRatio(CGSize(width: 1, height: 1), contentMode: .fill)
 | 
					                            .aspectRatio(CGSize(width: 1, height: 1), contentMode: .fill)
 | 
				
			||||||
                            .cornerRadius(8)
 | 
					                            .cornerRadius(8)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -148,6 +148,7 @@ struct LiveRoomViewV2: View {
 | 
				
			|||||||
                                ZStack {
 | 
					                                ZStack {
 | 
				
			||||||
                                    if viewModel.isBgOn {
 | 
					                                    if viewModel.isBgOn {
 | 
				
			||||||
                                        KFImage(URL(string: liveRoomInfo.coverImageUrl))
 | 
					                                        KFImage(URL(string: liveRoomInfo.coverImageUrl))
 | 
				
			||||||
 | 
					                                            .cancelOnDisappear(true)
 | 
				
			||||||
                                            .resizable()
 | 
					                                            .resizable()
 | 
				
			||||||
                                            .scaledToFit()
 | 
					                                            .scaledToFit()
 | 
				
			||||||
                                            .frame(maxWidth: .infinity, maxHeight: .infinity)
 | 
					                                            .frame(maxWidth: .infinity, maxHeight: .infinity)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -258,6 +258,7 @@ struct ProfileSectionView: View {
 | 
				
			|||||||
            HStack(spacing: 20) {
 | 
					            HStack(spacing: 20) {
 | 
				
			||||||
                // Profile Image Placeholder
 | 
					                // Profile Image Placeholder
 | 
				
			||||||
                KFImage(URL(string: profileUrl))
 | 
					                KFImage(URL(string: profileUrl))
 | 
				
			||||||
 | 
					                    .cancelOnDisappear(true)
 | 
				
			||||||
                    .resizable()
 | 
					                    .resizable()
 | 
				
			||||||
                    .frame(width: 64, height: 64)
 | 
					                    .frame(width: 64, height: 64)
 | 
				
			||||||
                    .clipShape(Circle())
 | 
					                    .clipShape(Circle())
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,6 +20,7 @@ struct EventDetailView: View {
 | 
				
			|||||||
                    
 | 
					                    
 | 
				
			||||||
                    ScrollView(.vertical, showsIndicators: false) {
 | 
					                    ScrollView(.vertical, showsIndicators: false) {
 | 
				
			||||||
                        KFImage(URL(string: event.detailImageUrl!))
 | 
					                        KFImage(URL(string: event.detailImageUrl!))
 | 
				
			||||||
 | 
					                            .cancelOnDisappear(true)
 | 
				
			||||||
                            .resizable()
 | 
					                            .resizable()
 | 
				
			||||||
                            .scaledToFit()
 | 
					                            .scaledToFit()
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user