feat(creator): 스케줄 섹션을 연결한다
This commit is contained in:
@@ -48,7 +48,7 @@ struct CreatorChannelView: View {
|
||||
selectedTabContent
|
||||
}
|
||||
}
|
||||
.ignoresSafeArea(.container, edges: .vertical)
|
||||
.ignoresSafeArea(.container, edges: .top)
|
||||
|
||||
if isTabBarSticky {
|
||||
tabBar
|
||||
@@ -156,8 +156,10 @@ struct CreatorChannelView: View {
|
||||
CreatorChannelHomeView(
|
||||
response: response,
|
||||
onSelectTab: selectTab,
|
||||
onTapLive: showLiveDetail,
|
||||
onTapContent: showContentDetail,
|
||||
onTapDonate: showDonationDialog
|
||||
onTapDonate: showDonationDialog,
|
||||
onTapSchedule: handleScheduleTap
|
||||
)
|
||||
} else {
|
||||
CreatorChannelPlaceholderTabView(title: viewModel.selectedTab.title)
|
||||
@@ -182,9 +184,43 @@ struct CreatorChannelView: View {
|
||||
}
|
||||
|
||||
private func showContentDetail(_ contentId: Int) {
|
||||
guard contentId > 0 else { return }
|
||||
AppState.shared.setAppStep(step: .contentDetail(contentId: contentId))
|
||||
}
|
||||
|
||||
private func showLiveDetail(_ roomId: Int) {
|
||||
guard roomId > 0 else { return }
|
||||
AppState.shared.setAppStep(
|
||||
step: .liveDetail(
|
||||
roomId: roomId,
|
||||
onClickParticipant: {},
|
||||
onClickReservation: {},
|
||||
onClickStart: {},
|
||||
onClickCancel: {}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private func showCommunity(_ creatorId: Int) {
|
||||
guard creatorId > 0 else { return }
|
||||
AppState.shared.setAppStep(step: .creatorCommunityAll(creatorId: creatorId))
|
||||
}
|
||||
|
||||
private func handleScheduleTap(type: CreatorActivityType, targetId: Int) {
|
||||
guard targetId > 0 else { return }
|
||||
|
||||
switch type {
|
||||
case .live, .liveReplay:
|
||||
showLiveDetail(targetId)
|
||||
case .audio:
|
||||
showContentDetail(targetId)
|
||||
case .community:
|
||||
showCommunity(targetId)
|
||||
case .unknown:
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
private func showDonationDialog() {
|
||||
guard let creatorId = viewModel.response?.creator.creatorId else { return }
|
||||
channelDonationViewModel.setCreatorId(creatorId, shouldFetch: false)
|
||||
|
||||
Reference in New Issue
Block a user