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