fix(live): 라이브 상세 표시를 보정한다
This commit is contained in:
@@ -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]()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user