콘텐츠 답글 - 댓글이 랜덤으로 보이는 버그 수정
This commit is contained in:
		| @@ -9,10 +9,8 @@ import SwiftUI | ||||
| import Kingfisher | ||||
|  | ||||
| struct AudioContentCommentItemView: View { | ||||
|      | ||||
|     @Binding var isDisabledNavigationLink: Bool | ||||
|      | ||||
|     let contentCreatorId: Int | ||||
|     let audioContentId: Int | ||||
|     let commentItem: GetAudioContentCommentListItem | ||||
|     let isReplyComment: Bool | ||||
|     let isShowPopupMenuButton: Bool | ||||
| @@ -120,9 +118,17 @@ struct AudioContentCommentItemView: View { | ||||
|                                 .padding(.top, commentItem.donationCan > 0 ? 0 : 13.3) | ||||
|                              | ||||
|                             if !isReplyComment { | ||||
|                                 Text(commentItem.replyCount > 0 ? "답글 \(commentItem.replyCount)개" : "답글 쓰기") | ||||
|                                     .font(.custom(Font.medium.rawValue, size: 13.3)) | ||||
|                                     .foregroundColor(Color(hex: "9970ff")) | ||||
|                                 NavigationLink( | ||||
|                                     destination: AudioContentListReplyView( | ||||
|                                         creatorId: contentCreatorId, | ||||
|                                         audioContentId: audioContentId, | ||||
|                                         parentComment: commentItem | ||||
|                                     ) | ||||
|                                 ) { | ||||
|                                     Text(commentItem.replyCount > 0 ? "답글 \(commentItem.replyCount)개" : "답글 쓰기") | ||||
|                                         .font(.custom(Font.medium.rawValue, size: 13.3)) | ||||
|                                         .foregroundColor(Color(hex: "9970ff")) | ||||
|                                 } | ||||
|                             } | ||||
|                         } | ||||
|                     } | ||||
| @@ -145,7 +151,6 @@ struct AudioContentCommentItemView: View { | ||||
|                             .foregroundColor(Color(hex: "777777")) | ||||
|                             .onTapGesture { | ||||
|                                 isModeModify = true | ||||
|                                 isDisabledNavigationLink = true | ||||
|                                 isShowPopupMenu = false | ||||
|                             } | ||||
|                     } | ||||
|   | ||||
| @@ -19,8 +19,6 @@ struct AudioContentCommentListView: View { | ||||
|      | ||||
|     @State private var commentId: Int = 0 | ||||
|     @State private var isShowDeletePopup: Bool = false | ||||
|     @State private var isDisabledNavigationLink: Bool = false | ||||
|     @State private var isShowReplyView: Bool = false | ||||
|      | ||||
|     var body: some View { | ||||
|         NavigationView { | ||||
| @@ -105,18 +103,9 @@ struct AudioContentCommentListView: View { | ||||
|                             ForEach(0..<viewModel.commentList.count, id: \.self) { index in | ||||
|                                 let comment = viewModel.commentList[index] | ||||
|                                 VStack { | ||||
|                                     NavigationLink( | ||||
|                                         destination: AudioContentListReplyView( | ||||
|                                             creatorId: creatorId, | ||||
|                                             audioContentId: audioContentId, | ||||
|                                             parentComment: comment | ||||
|                                         ), | ||||
|                                         isActive: $isShowReplyView | ||||
|                                     ) { EmptyView() } | ||||
|                                      | ||||
|                                     AudioContentCommentItemView( | ||||
|                                         isDisabledNavigationLink: $isDisabledNavigationLink, | ||||
|                                         contentCreatorId: creatorId, | ||||
|                                         audioContentId: audioContentId, | ||||
|                                         commentItem: comment, | ||||
|                                         isReplyComment: false, | ||||
|                                         isShowPopupMenuButton: true, | ||||
| @@ -135,11 +124,6 @@ struct AudioContentCommentListView: View { | ||||
|                                             viewModel.getCommentList() | ||||
|                                         } | ||||
|                                     } | ||||
|                                     .onTapGesture { | ||||
|                                         if !isDisabledNavigationLink { | ||||
|                                             isShowReplyView = true | ||||
|                                         } | ||||
|                                     } | ||||
|                                 } | ||||
|                             } | ||||
|                         } | ||||
|   | ||||
| @@ -92,8 +92,8 @@ struct AudioContentListReplyView: View { | ||||
|                     .padding(.horizontal, 13.3) | ||||
|                  | ||||
|                 AudioContentCommentItemView( | ||||
|                     isDisabledNavigationLink: .constant(false), | ||||
|                     contentCreatorId: creatorId, | ||||
|                     audioContentId: audioContentId, | ||||
|                     commentItem: parentComment, | ||||
|                     isReplyComment: true, | ||||
|                     isShowPopupMenuButton: false, | ||||
| @@ -108,8 +108,8 @@ struct AudioContentListReplyView: View { | ||||
|                         ForEach(0..<viewModel.commentList.count, id: \.self) { index in | ||||
|                             let comment = viewModel.commentList[index] | ||||
|                             AudioContentCommentItemView( | ||||
|                                 isDisabledNavigationLink: .constant(false), | ||||
|                                 contentCreatorId: creatorId, | ||||
|                                 audioContentId: audioContentId, | ||||
|                                 commentItem: comment, | ||||
|                                 isReplyComment: true, | ||||
|                                 isShowPopupMenuButton: true, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung