diff --git a/SodaLive/Sources/Main/Home/HomeView.swift b/SodaLive/Sources/Main/Home/HomeView.swift index f665f51..dab6c12 100644 --- a/SodaLive/Sources/Main/Home/HomeView.swift +++ b/SodaLive/Sources/Main/Home/HomeView.swift @@ -488,9 +488,7 @@ struct HomeView: View { if !UserDefaults.isAdultContentVisible() { pendingAction = nil - AppState.shared.errorMessage = I18n.Settings.adultContentEnableGuide - AppState.shared.isShowErrorPopup = true - AppState.shared.setAppStep(step: .contentViewSettings) + moveToContentSettingsWithGuideToast() return } } @@ -513,6 +511,11 @@ struct HomeView: View { ) } + private func moveToContentSettingsWithGuideToast() { + AppState.shared.setPendingContentSettingsGuideMessage(I18n.Settings.adultContentEnableGuide) + AppState.shared.setAppStep(step: .contentViewSettings) + } + private func handleExternalNavigationRequest( value: Int, navigationAction: @escaping () -> Void, diff --git a/docs/20260328_라이브19금설정이동후토스트표시.md b/docs/20260328_라이브19금설정이동후토스트표시.md new file mode 100644 index 0000000..5dccc2a --- /dev/null +++ b/docs/20260328_라이브19금설정이동후토스트표시.md @@ -0,0 +1,66 @@ +# 20260328 라이브 19금 설정 이동 후 토스트 표시 + +## 개요 +- 라이브 아이템(19금) 터치 시 `민감한 콘텐츠 보기`가 꺼져 있으면, 현재 화면에서 토스트를 먼저 띄우고 즉시 설정 화면으로 이동하여 메시지 확인이 어려운 문제를 수정한다. +- 채팅 캐릭터 상세 진입과 동일하게, 콘텐츠 보기 설정 화면으로 먼저 이동한 뒤 안내 토스트가 보이도록 흐름을 통일한다. + +## 완료 기준 (Acceptance Criteria) +- [x] AC1: 라이브 19금 아이템 터치 + 민감한 콘텐츠 OFF 조건에서 `.contentViewSettings` 이동이 정상 동작한다. + - QA: 실기기/시뮬레이터에서 해당 조건 재현 후 화면 전환 확인. +- [x] AC2: 설정 화면 진입 직후 `I18n.Settings.adultContentEnableGuide` 토스트가 표시된다. + - QA: 설정 화면에서 토스트 노출 여부 확인. +- [x] AC3: KR 본인인증 분기(`isKoreanCountry && auth == false`) 동작은 기존과 동일하다. + - QA: KR + 미인증 계정으로 터치 시 인증 다이얼로그 노출 확인. +- [x] AC4: 성인 방송이 아니거나 민감한 콘텐츠 ON 상태에서는 기존 라이브 상세 진입 동작을 유지한다. + - QA: non-adult / adult+ON 각각 상세 진입 확인. + +## 구현 체크리스트 +- [x] 라이브 진입 성인 가드 구현 위치(`HomeView.handleLiveNowItemTap`) 수정 +- [x] 기존 패턴과 동일하게 `pendingContentSettingsGuideMessage` 기반으로 토스트 전달 +- [x] 요청 범위 파일(`HomeTabView`, `LiveView`) 연계 동작 영향 점검 +- [x] 정적 진단/빌드/테스트 실행 +- [x] 문서 체크박스 및 검증 기록 업데이트 + +## 검증 계획 +- [x] `lsp_diagnostics`: + - `SodaLive/Sources/Main/Home/HomeView.swift` + - (영향 점검) `SodaLive/Sources/Home/HomeTabView.swift` + - (영향 점검) `SodaLive/Sources/Live/LiveView.swift` +- [x] 빌드: + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build` + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build` +- [x] 테스트: + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test` + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test` + +## 검증 기록 +- 일시: 2026-03-28 + - 무엇: 라이브 19금 콘텐츠 설정 이동 후 토스트 표시 개선 작업 계획 수립 + - 왜: 요청사항의 완료 기준/검증 절차를 고정해 정확히 동일 동작으로 수정하기 위함 + - 어떻게: 기존 패턴(`ChatTabView` → `ContentSettingsView.onAppear`) 탐색 결과를 바탕으로 최소 변경 계획 문서화 + - 실행 명령/도구: `apply_patch(문서 생성)` + - 결과: 계획 문서 생성 완료 + +- 일시: 2026-03-28 + - 무엇: 라이브 19금 진입 차단 시 토스트 표시 시점을 설정 화면 진입 후로 변경 + - 왜: 기존에는 메시지 표시와 화면 이동이 동시에 발생해 안내 문구 확인이 어려웠기 때문 + - 어떻게: + - `HomeView.handleLiveNowItemTap`의 성인 콘텐츠 OFF 분기에서 전역 에러 팝업 즉시 표시를 제거 + - `moveToContentSettingsWithGuideToast()`를 추가해 + - `AppState.shared.setPendingContentSettingsGuideMessage(I18n.Settings.adultContentEnableGuide)` + - `AppState.shared.setAppStep(step: .contentViewSettings)` + 순서로 처리 + - `ContentSettingsView.onAppear`의 기존 pending 메시지 consume 패턴을 그대로 재사용해 설정 화면에서 토스트 표시 + - 실행 명령/도구: + - `lsp_diagnostics("SodaLive/Sources/Main/Home/HomeView.swift")` + - `lsp_diagnostics("SodaLive/Sources/Home/HomeTabView.swift")` + - `lsp_diagnostics("SodaLive/Sources/Live/LiveView.swift")` + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build` + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build` + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test` + - `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test` + - 결과: + - 두 스킴 Debug 빌드 모두 `** BUILD SUCCEEDED **` + - 테스트는 두 스킴 모두 `Scheme ... is not currently configured for the test action`으로 실행 불가(테스트 액션 미구성) + - `lsp_diagnostics`는 SourceKit 환경 한계로 외부 모듈 미해결(`Firebase`, `Bootpay`, `RefreshableScrollView`) 오류를 보고했으나 실제 빌드는 통과 + - 수동 QA는 CLI 환경 제약으로 미실행(실기기/시뮬레이터에서 라이브 19금 + 민감 콘텐츠 OFF 시 설정 화면 진입 후 토스트 노출 확인 필요)