콘텐츠 댓글 수정 오류
- 댓글 수정 모드 상태에서 다른 댓글 쓰기 혹은 삭제 등의 액션을 해서 댓글 수의 변화가 있을 때 내 글이 아닌 다른 사람의 글이 수정 모드로 보이는 버그 수정
This commit is contained in:
@@ -110,35 +110,37 @@ struct AudioContentListReplyView: View {
|
||||
.padding(.horizontal, 26.7)
|
||||
.padding(.bottom, 13.3)
|
||||
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
LazyVStack(spacing: 13.3) {
|
||||
ForEach(0..<viewModel.commentList.count, id: \.self) { index in
|
||||
let comment = viewModel.commentList[index]
|
||||
AudioContentCommentItemView(
|
||||
contentCreatorId: creatorId,
|
||||
audioContentId: audioContentId,
|
||||
commentItem: comment,
|
||||
isReplyComment: true,
|
||||
isShowPopupMenuButton: true,
|
||||
modifyComment: { commentId, comment in
|
||||
hideKeyboard()
|
||||
viewModel.modifyComment(commentId: commentId, audioContentId: audioContentId, comment: comment)
|
||||
},
|
||||
onClickDelete: {
|
||||
commentId = $0
|
||||
isShowDeletePopup = true
|
||||
},
|
||||
onClickProfile: {
|
||||
memberId = $0
|
||||
isShowMemberProfilePopup = true
|
||||
}
|
||||
)
|
||||
if !viewModel.isRegisterComment {
|
||||
ScrollView(.vertical, showsIndicators: false) {
|
||||
LazyVStack(spacing: 13.3) {
|
||||
ForEach(0..<viewModel.commentList.count, id: \.self) { index in
|
||||
let comment = viewModel.commentList[index]
|
||||
AudioContentCommentItemView(
|
||||
contentCreatorId: creatorId,
|
||||
audioContentId: audioContentId,
|
||||
commentItem: comment,
|
||||
isReplyComment: true,
|
||||
isShowPopupMenuButton: true,
|
||||
modifyComment: { commentId, comment in
|
||||
hideKeyboard()
|
||||
viewModel.modifyComment(commentId: commentId, audioContentId: audioContentId, comment: comment)
|
||||
},
|
||||
onClickDelete: {
|
||||
commentId = $0
|
||||
isShowDeletePopup = true
|
||||
},
|
||||
onClickProfile: {
|
||||
memberId = $0
|
||||
isShowMemberProfilePopup = true
|
||||
}
|
||||
)
|
||||
.padding(.horizontal, 40)
|
||||
.onAppear {
|
||||
if index == viewModel.commentList.count - 1 {
|
||||
viewModel.getCommentList()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user