fix(live-room): 스탭 해제 후 방 정보 갱신 타이밍을 보정한다

This commit is contained in:
Yu Sung
2026-03-30 18:24:40 +09:00
parent ec7e9cc71c
commit 3a4df173d2
2 changed files with 45 additions and 4 deletions

View File

@@ -0,0 +1,31 @@
# 20260330 라이브룸 스탭 해제 갱신 수정
## 작업 개요
- 라이브 진행 중 스탭 지정/해제 시 `LiveRoomProfilesDialogView`의 스탭 표시가 실시간으로 정확히 갱신되도록 원인 분석 및 수정한다.
## 구현 체크리스트
- [x] 관련 코드 경로 병렬 탐색(Explore + 직접 검색)으로 원인 확정
- [x] 스탭 해제 동작 시 서버/클라이언트 상태 갱신 누락 수정
- [x] `LiveRoomProfilesDialogView`에 전달되는 `roomInfo` 재조회 타이밍 보정
- [x] 변경 파일 진단 및 빌드 검증 수행
- [x] 검증 기록 누적
## 검증 기록
- 무엇: 스탭 해제 시점에 방장 클라이언트가 너무 이른 시점에만 `getRoomInfo()`를 호출해 `managerList`가 stale 상태로 남는 문제를 수정.
- 왜: `LiveRoomProfilesDialogView`는 전달받은 `roomInfo.managerList`를 표시하므로, 해제 완료 이후의 최신 `roomInfo` 재조회 트리거가 필요.
- 어떻게:
- `LiveRoomViewModel.changeListener(peerId:isFromManager:)`에서 스탭 해제 시 즉시 `setManagerMessage()`를 보내던 흐름을 제거하고, 해제 안내 메시지 전송 후 지연 재조회(`DispatchQueue.main.asyncAfter`)를 추가.
- `LiveRoomViewModel.setListener()`에서 현재 사용자가 해제 대상 스탭이었던 경우(`wasManager`)에 `setManagerMessage()`를 전파해, 실제 해제 완료 이후 전체 클라이언트가 `getRoomInfo()`를 재호출하도록 보강.
- 실행 명령 및 결과:
- `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.`
- `lsp_diagnostics(LiveRoomViewModel.swift)``No such module 'Moya'` (로컬 SourceKit 모듈 해석 환경 이슈로 확인됨)
- 수동 QA 시나리오(디바이스/시뮬레이터):
1. 방장이 스피커/리스너를 스탭으로 지정한다.
2. `LiveRoomProfilesDialogView`에서 스탭 섹션에 즉시 반영되는지 확인한다.
3. 동일 사용자를 스탭 해제한다.
4. 다이얼로그를 닫지 않은 상태에서도 스탭 섹션에서 제거되는지 확인한다.