fix(live): 라이브 상세 표시를 보정한다

This commit is contained in:
Yu Sung
2026-07-20 17:31:49 +09:00
parent dd5144ec3f
commit 43e32f1867
6 changed files with 190 additions and 22 deletions

View File

@@ -272,6 +272,10 @@ struct LiveDetailView: View {
.onAppear {
viewModel.getDetail(roomId: roomId)
}
.onChange(of: viewModel.isShowPopup) { isShowing in
guard isShowing, viewModel.room == nil else { return }
handleDetailLoadFailure()
}
}
@ViewBuilder
@@ -473,6 +477,18 @@ struct LiveDetailView: View {
}
}
private func handleDetailLoadFailure() {
let message = viewModel.errorMessage
viewModel.isShowPopup = false
AppState.shared.isShowErrorPopup = false
hideView()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
AppState.shared.errorMessage = message
AppState.shared.isShowErrorPopup = true
}
}
private func makeSnsItems(from manager: GetRoomDetailManager) -> [LiveDetailSnsItem] {
var items = [LiveDetailSnsItem]()