feat(creator): 팬Talk 답글 상세를 연결한다

This commit is contained in:
Yu Sung
2026-07-07 15:04:34 +09:00
parent 2283ea4b44
commit 75aa99768e
3 changed files with 24 additions and 1 deletions

View File

@@ -292,7 +292,8 @@ struct CreatorChannelView: View {
isOwnCreatorChannel: isOwnCreatorChannel, isOwnCreatorChannel: isOwnCreatorChannel,
viewModel: fanTalkViewModel, viewModel: fanTalkViewModel,
onTapWrite: showFanTalkWriteView, onTapWrite: showFanTalkWriteView,
onTapEdit: showFanTalkModifyView onTapEdit: showFanTalkModifyView,
onTapDetail: showFanTalkReplyDetail
) )
} else if viewModel.selectedTab == .community { } else if viewModel.selectedTab == .community {
CreatorChannelCommunityTabView( CreatorChannelCommunityTabView(
@@ -629,6 +630,19 @@ struct CreatorChannelView: View {
) )
) )
} }
private func showFanTalkReplyDetail(_ fanTalk: CreatorChannelFanTalkItemResponse) {
guard isOwnCreatorChannel else { return }
AppState.shared.setAppStep(
step: .creatorChannelReplyDetail(
context: .fanTalk(creatorId: creatorId, parentFanTalk: fanTalk),
onFanTalkRefresh: {
fanTalkViewModel.fetchFirstPage(creatorId: creatorId)
}
)
)
}
} }
struct CreatorChannelView_Previews: PreviewProvider { struct CreatorChannelView_Previews: PreviewProvider {

View File

@@ -6,6 +6,7 @@ struct CreatorChannelFanTalkListItem: View {
let isOwnCreatorChannel: Bool let isOwnCreatorChannel: Bool
let onTapReport: () -> Void let onTapReport: () -> Void
let onTapMore: () -> Void let onTapMore: () -> Void
let onTapDetail: () -> Void
var body: some View { var body: some View {
VStack(alignment: .leading, spacing: 0) { VStack(alignment: .leading, spacing: 0) {
@@ -41,6 +42,8 @@ struct CreatorChannelFanTalkListItem: View {
.frame(height: 1) .frame(height: 1)
} }
.background(Color.black) .background(Color.black)
.contentShape(Rectangle())
.onTapGesture(perform: onTapDetail)
} }
private var header: some View { private var header: some View {

View File

@@ -6,6 +6,7 @@ struct CreatorChannelFanTalkTabView: View {
@ObservedObject var viewModel: CreatorChannelFanTalkViewModel @ObservedObject var viewModel: CreatorChannelFanTalkViewModel
let onTapWrite: () -> Void let onTapWrite: () -> Void
let onTapEdit: (CreatorChannelFanTalkItemResponse) -> Void let onTapEdit: (CreatorChannelFanTalkItemResponse) -> Void
let onTapDetail: (CreatorChannelFanTalkItemResponse) -> Void
@State private var actionPopupFanTalk: CreatorChannelFanTalkItemResponse? @State private var actionPopupFanTalk: CreatorChannelFanTalkItemResponse?
@State private var fanTalkItemFrames = [Int: CGRect]() @State private var fanTalkItemFrames = [Int: CGRect]()
@@ -76,6 +77,11 @@ struct CreatorChannelFanTalkTabView: View {
}, },
onTapMore: { onTapMore: {
actionPopupFanTalk = actionPopupFanTalk?.fanTalkId == fanTalk.fanTalkId ? nil : fanTalk actionPopupFanTalk = actionPopupFanTalk?.fanTalkId == fanTalk.fanTalkId ? nil : fanTalk
},
onTapDetail: {
guard isOwnCreatorChannel else { return }
actionPopupFanTalk = nil
onTapDetail(fanTalk)
} }
) )
.background { .background {