feat(creator): 홈 탭 콘텐츠를 연결한다

This commit is contained in:
Yu Sung
2026-07-03 01:53:30 +09:00
parent 069a8cf5e8
commit 2f1feb9561
2 changed files with 29 additions and 2 deletions

View File

@@ -125,7 +125,33 @@ struct CreatorChannelView: View {
@ViewBuilder @ViewBuilder
private var selectedTabContent: some View { private var selectedTabContent: some View {
CreatorChannelPlaceholderTabView(title: viewModel.selectedTab.title) if viewModel.selectedTab != .home {
CreatorChannelPlaceholderTabView(title: viewModel.selectedTab.title)
} else if let response = viewModel.response {
CreatorChannelHomeView(
response: response,
onSelectTab: selectTab
)
} else {
CreatorChannelPlaceholderTabView(title: viewModel.selectedTab.title)
}
}
private func selectTab(_ tab: CreatorChannelTab) {
switch tab {
case .audio:
viewModel.selectedTab = .audio
case .series:
viewModel.selectedTab = .series
case .community:
viewModel.selectedTab = .community
case .fanTalk:
viewModel.selectedTab = .fanTalk
case .donation:
viewModel.selectedTab = .donation
default:
viewModel.selectedTab = tab
}
} }
} }

View File

@@ -321,7 +321,7 @@
### Phase 4: 홈 외 placeholder ### Phase 4: 홈 외 placeholder
- [ ] **Task 4.1: 홈 외 tab placeholder 연결** - [x] **Task 4.1: 홈 외 tab placeholder 연결**
- 대상 파일: - 대상 파일:
- 수정: `SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift` - 수정: `SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift`
- 생성: `SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelPlaceholderTabView.swift` - 생성: `SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelPlaceholderTabView.swift`
@@ -619,6 +619,7 @@
- 2026-07-02: 사용자 확인 사항을 반영해 title bar, 크리에이터 프로필 header, tab-bar를 `CreatorChannelView` 공통 shell로 분리하고, `CreatorChannelHomeView`는 tab-bar 아래 홈 탭 콘텐츠만 담당하도록 PRD와 계획을 갱신했다. - 2026-07-02: 사용자 확인 사항을 반영해 title bar, 크리에이터 프로필 header, tab-bar를 `CreatorChannelView` 공통 shell로 분리하고, `CreatorChannelHomeView`는 tab-bar 아래 홈 탭 콘텐츠만 담당하도록 PRD와 계획을 갱신했다.
- 2026-07-02: 이미 완료된 Phase 1~2 기록은 보존하고, 후속 구조 정리를 위해 Task 2.4 `공통 CreatorChannel shell로 구조 정리`를 추가했다. - 2026-07-02: 이미 완료된 Phase 1~2 기록은 보존하고, 후속 구조 정리를 위해 Task 2.4 `공통 CreatorChannel shell로 구조 정리`를 추가했다.
- 2026-07-02: 사용자 확인 사항을 반영해 title bar Figma URL 3종과 사용할 아이콘 asset(`ic_new_bar_back`, `ic_new_follow`, `ic_new_following`, `ic_new_more`, `ic_bar_bell`, `ic_bar_bell_fill`)을 Task 3.1 및 최종 회귀 검색 기준에 추가했다. - 2026-07-02: 사용자 확인 사항을 반영해 title bar Figma URL 3종과 사용할 아이콘 asset(`ic_new_bar_back`, `ic_new_follow`, `ic_new_following`, `ic_new_more`, `ic_bar_bell`, `ic_bar_bell_fill`)을 Task 3.1 및 최종 회귀 검색 기준에 추가했다.
- 2026-07-03: Phase 4를 완료해 `CreatorChannelView`에서 홈 탭은 `CreatorChannelHomeView`, 홈 외 탭은 `CreatorChannelPlaceholderTabView(title: selectedTab.title)`로 분기하고, 홈 섹션 전체보기용 tab 선택 closure가 `.audio`, `.series`, `.community`, `.fanTalk`, `.donation`으로 전환되도록 연결했다.
- 2026-07-02: 기존 `UserProfile` 구현을 확인해 title bar 팔로우/팔로우 취소/알림 설정/알림 설정 취소를 `UserRepository.creatorFollow(creatorId:follow:notify:)`로 처리하고, `ic_bar_bell`/`ic_bar_bell_fill` 터치 시 각각 `notify: true`/`notify: false` 호출이 일어나도록 계획에 반영했다. - 2026-07-02: 기존 `UserProfile` 구현을 확인해 title bar 팔로우/팔로우 취소/알림 설정/알림 설정 취소를 `UserRepository.creatorFollow(creatorId:follow:notify:)`로 처리하고, `ic_bar_bell`/`ic_bar_bell_fill` 터치 시 각각 `notify: true`/`notify: false` 호출이 일어나도록 계획에 반영했다.
- 2026-07-03: Task 3.4 구현을 완료했다. `CreatorChannelView`에서 geometry preference로 tab-bar 위치를 추적하고, sticky 기준을 디바이스 최상단이 아닌 title bar 하단(`safeAreaInsets.top + 56`)으로 계산하도록 변경했다. `rg "PreferenceKey|GeometryReader|ZStack|overlay|backgroundProgress|Color\\.clear|opacity|isTabBarSticky|clamp|safeAreaInsets|CreatorChannelTitleBar|CreatorChannelTabBar" ...` 기준 키워드를 확인했고, `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build``BUILD SUCCEEDED`로 완료됐다. - 2026-07-03: Task 3.4 구현을 완료했다. `CreatorChannelView`에서 geometry preference로 tab-bar 위치를 추적하고, sticky 기준을 디바이스 최상단이 아닌 title bar 하단(`safeAreaInsets.top + 56`)으로 계산하도록 변경했다. `rg "PreferenceKey|GeometryReader|ZStack|overlay|backgroundProgress|Color\\.clear|opacity|isTabBarSticky|clamp|safeAreaInsets|CreatorChannelTitleBar|CreatorChannelTabBar" ...` 기준 키워드를 확인했고, `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build``BUILD SUCCEEDED`로 완료됐다.
- 2026-07-03: Task 3.5 구현을 완료했다. `CreatorChannelTitleBar`에 크리에이터 닉네임 주입값을 추가하고, `backgroundProgress`가 1일 때만 한 줄 말줄임으로 표시되도록 연결했다. 우측 팔로우/알림/더보기 영역은 `layoutPriority`로 우선 노출되도록 처리했다. `rg "nickname|lineLimit\\(1\\)|truncationMode|layoutPriority|backgroundProgress|opacity|CreatorChannelTitleBar\\(" ...` 기준 키워드를 확인했고, `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build``BUILD SUCCEEDED`로 완료됐다. - 2026-07-03: Task 3.5 구현을 완료했다. `CreatorChannelTitleBar`에 크리에이터 닉네임 주입값을 추가하고, `backgroundProgress`가 1일 때만 한 줄 말줄임으로 표시되도록 연결했다. 우측 팔로우/알림/더보기 영역은 `layoutPriority`로 우선 노출되도록 처리했다. `rg "nickname|lineLimit\\(1\\)|truncationMode|layoutPriority|backgroundProgress|opacity|CreatorChannelTitleBar\\(" ...` 기준 키워드를 확인했고, `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build``BUILD SUCCEEDED`로 완료됐다.