feat(channel): 공유 진입점을 연결한다

This commit is contained in:
Yu Sung
2026-09-15 11:10:34 +09:00
parent fba87f201b
commit dc7a6d083b
4 changed files with 63 additions and 12 deletions
@@ -192,7 +192,7 @@ struct CreatorChannelView: View {
)
}
if viewModel.response != nil && isShowReportMenu {
if let creator = viewModel.response?.creator, isShowReportMenu {
VStack(spacing: 0) {
ProfileReportMenuView(
isShowing: $isShowReportMenu,
@@ -200,7 +200,10 @@ struct CreatorChannelView: View {
userBlockAction: { isShowUserBlockConfirm = true },
userUnBlockAction: {},
userReportAction: { isShowUserReport = true },
profileReportAction: { isShowProfileReport = true }
profileReportAction: { isShowProfileReport = true },
channelShareAction: {
viewModel.shareChannel(creatorId: creator.creatorId, nickname: creator.nickname)
}
)
if proxy.safeAreaInsets.bottom > 0 {
@@ -246,6 +249,13 @@ struct CreatorChannelView: View {
}
}
.navigationBarBackButtonHidden(true)
.sheet(
isPresented: $viewModel.isShowShareView,
onDismiss: { viewModel.shareMessage = "" },
content: {
ActivityViewController(activityItems: [viewModel.shareMessage])
}
)
.fullScreenCover(isPresented: $isShowAuthView) {
authView
}
@@ -270,6 +280,7 @@ struct CreatorChannelView: View {
isFollow: viewModel.response?.creator.isFollow ?? false,
isNotify: viewModel.response?.creator.isNotify ?? false,
backgroundProgress: backgroundProgress,
showsTrailingActions: viewModel.response != nil,
showsCreatorActions: !isOwnCreatorChannel,
onTapBack: {
dismiss()
@@ -288,6 +299,11 @@ struct CreatorChannelView: View {
},
onTapMore: {
isShowReportMenu = true
},
onTapShare: {
if let creator = viewModel.response?.creator {
viewModel.shareChannel(creatorId: creator.creatorId, nickname: creator.nickname)
}
}
)
}