fix(live): 종료 라이브 토스트를 노출한다

This commit is contained in:
Yu Sung
2026-03-13 16:49:44 +09:00
parent fb85f3e90c
commit 026f855bc5
3 changed files with 41 additions and 1 deletions

View File

@@ -426,7 +426,11 @@ final class LiveViewModel: ObservableObject {
onSuccess(data)
} else {
if let message = decoded.message {
self.errorMessage = message
if message.contains("종료") {
self.errorMessage = "이미 종료된 라이브 입니다."
} else {
self.errorMessage = message
}
} else {
self.errorMessage = "라이브 정보를 가져오지 못했습니다.\n다시 시도해 주세요."
}

View File

@@ -446,6 +446,11 @@ struct HomeView: View {
}
}
}
.sodaToast(
isPresented: $liveViewModel.isShowPopup,
message: liveViewModel.errorMessage,
autohideIn: 2
)
}
}

View File

@@ -0,0 +1,31 @@
# 20260313 알림 리스트 종료 라이브 토스트 수정
## 작업 목표
- 알림 리스트에서 라이브/예약 라이브 알림을 탭했을 때 이미 종료된 라이브인 경우 토스트 문구가 노출되지 않는 문제를 해결한다.
- 종료된 라이브는 토스트 `이미 종료된 라이브 입니다.`를 표시하고, 기존 정상 딥링크 이동 동작은 유지한다.
## 구현 체크리스트
- [x] 알림 리스트 라이브 탭 처리에서 종료 라이브 판단 지점을 추가한다.
- [x] 종료 라이브 판단 시 토스트 `이미 종료된 라이브 입니다.`를 표시한다.
- [x] 종료되지 않은 라이브/비라이브 딥링크의 기존 동작이 유지되는지 확인한다.
- [x] 진단/빌드/테스트 검증 및 결과를 문서에 기록한다.
## 수용 기준
- [x] 알림 리스트에서 라이브/예약 라이브 알림 탭 시, 종료된 라이브면 토스트 `이미 종료된 라이브 입니다.`가 표시된다.
- [x] 종료되지 않은 라이브/예약 라이브 알림 탭 시 기존 딥링크 이동 동작이 유지된다.
- [x] 비라이브 알림 탭 동작은 기존과 동일하다.
## 검증 기록
- 무엇/왜/어떻게: `HomeView`의 알림 딥링크 라이브 진입(`pushRoomId` 변경 감지) 흐름에서 사용하는 `liveViewModel`은 기존에 토스트 바인딩이 없어, `LiveViewModel.getRoomDetail` 실패 시 `isShowPopup`/`errorMessage`가 설정되어도 사용자에게 메시지가 보이지 않았다. `HomeView``liveViewModel``.sodaToast`를 추가해 종료 라이브 에러 메시지가 실제 UI로 노출되도록 수정했다.
- 무엇/왜/어떻게: `LiveViewModel.getRoomDetail` 실패 메시지에서 종료 상황(`message.contains("종료")`)은 문구를 `이미 종료된 라이브 입니다.`로 고정해 요구 문구와 동일하게 표시되도록 보정했다. 종료 외 메시지는 기존 서버 메시지를 그대로 유지한다.
- 실행 명령: `lsp_diagnostics` (`SodaLive/Sources/Main/Home/HomeView.swift`, `SodaLive/Sources/Live/LiveViewModel.swift`)
- 결과: SourceKit 단독 분석 컨텍스트에서 모듈/심볼 미해결(`Firebase`, `LiveRepository` 등) 오류가 출력됐다. 동일 변경분은 아래 Xcode 빌드에서 컴파일 성공으로 확인했다.
- 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build`
- 결과: `** BUILD SUCCEEDED **`
- 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build`
- 결과: `** BUILD SUCCEEDED **`
- 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test`
- 결과: `Scheme SodaLive is not currently configured for the test action.`
- 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test`
- 결과: `Scheme SodaLive-dev is not currently configured for the test action.`
- 수동 QA: 코드 경로 점검으로 `PushNotificationListViewModel.onTapItem``AppDeepLinkHandler(.notificationList)``HomeView.valueChanged(pushRoomId)``liveViewModel.enterLiveRoom``LiveViewModel.getRoomDetail` 실패 시 `HomeView.sodaToast` 노출 흐름을 확인했다. 종료 메시지에 `종료`가 포함되면 최종 토스트 문구가 `이미 종료된 라이브 입니다.`로 출력되도록 확인했다.