feat(creator): 커뮤니티 답글 상세를 연결한다
This commit is contained in:
@@ -18,6 +18,7 @@ struct CreatorCommunityCommentItemView: View {
|
||||
let modifyComment: (Int, String) -> Void
|
||||
let onClickDelete: (Int) -> Void
|
||||
let onClickProfile: (Int) -> Void
|
||||
let onTapReplyDetail: () -> Void
|
||||
|
||||
@State var isShowPopupMenu: Bool = false
|
||||
@State var isModeModify: Bool = false
|
||||
@@ -110,19 +111,19 @@ struct CreatorCommunityCommentItemView: View {
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.lineSpacing(8)
|
||||
.padding(.top, 13.3)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
if isReplyComment == false {
|
||||
onTapReplyDetail()
|
||||
}
|
||||
}
|
||||
|
||||
if !isReplyComment {
|
||||
NavigationLink(
|
||||
destination: CreatorCommunityCommentReplyView(
|
||||
creatorId: creatorId,
|
||||
postId: postId,
|
||||
parentComment: commentItem
|
||||
)
|
||||
) {
|
||||
Text(commentItem.replyCount > 0 ? I18n.Explorer.replyCount(commentItem.replyCount) : I18n.Explorer.replyWrite)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.button)
|
||||
}
|
||||
Text(commentItem.replyCount > 0 ? I18n.Explorer.replyCount(commentItem.replyCount) : I18n.Explorer.replyWrite)
|
||||
.appFont(size: 13.3, weight: .medium)
|
||||
.foregroundColor(Color.button)
|
||||
.onTapGesture(perform: onTapReplyDetail)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,6 +145,20 @@ struct CreatorCommunityCommentListView: View {
|
||||
onClickProfile: {
|
||||
memberId = $0
|
||||
isShowMemberProfilePopup = true
|
||||
},
|
||||
onTapReplyDetail: {
|
||||
isPresented = false
|
||||
DispatchQueue.main.async {
|
||||
AppState.shared.setAppStep(
|
||||
step: .creatorChannelReplyDetail(
|
||||
context: .community(
|
||||
creatorId: creatorId,
|
||||
postId: postId,
|
||||
parentComment: comment
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
.padding(.horizontal, 26.7)
|
||||
|
||||
@@ -105,7 +105,8 @@ struct CreatorCommunityCommentReplyView: View {
|
||||
onClickProfile: {
|
||||
memberId = $0
|
||||
isShowMemberProfilePopup = true
|
||||
}
|
||||
},
|
||||
onTapReplyDetail: {}
|
||||
)
|
||||
.padding(.horizontal, 26.7)
|
||||
.padding(.bottom, 13.3)
|
||||
@@ -131,7 +132,8 @@ struct CreatorCommunityCommentReplyView: View {
|
||||
onClickProfile: {
|
||||
memberId = $0
|
||||
isShowMemberProfilePopup = true
|
||||
}
|
||||
},
|
||||
onTapReplyDetail: {}
|
||||
)
|
||||
.padding(.horizontal, 26.7)
|
||||
.padding(.leading, 13.3)
|
||||
|
||||
Reference in New Issue
Block a user