feat: 메인 라이브
- 여러개로 나눠져 있던 API 하나로 병합
This commit is contained in:
@@ -69,7 +69,7 @@ struct LiveView: View {
|
||||
}
|
||||
},
|
||||
onClickRefresh: {
|
||||
viewModel.getSummary()
|
||||
viewModel.getLiveMain()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -92,7 +92,7 @@ struct LiveView: View {
|
||||
|
||||
SectionLiveReservationView(
|
||||
items: viewModel.liveReservationItems,
|
||||
onClickCancel: { viewModel.getSummary() },
|
||||
onClickCancel: { viewModel.getLiveMain() },
|
||||
onClickStart: { roomId in
|
||||
if !token.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
|
||||
processStart(roomId: roomId)
|
||||
@@ -119,7 +119,7 @@ struct LiveView: View {
|
||||
.padding(.vertical, 24)
|
||||
}
|
||||
.onAppear {
|
||||
viewModel.getSummary()
|
||||
viewModel.getLiveMain()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,10 +159,7 @@ struct LiveView: View {
|
||||
)
|
||||
}
|
||||
|
||||
if viewModel.isFollowedChannelLoading ||
|
||||
viewModel.isRecommendChannelLoading ||
|
||||
viewModel.isRecommendLiveLoading ||
|
||||
viewModel.isLoading {
|
||||
if viewModel.isLoading {
|
||||
LoadingView()
|
||||
}
|
||||
}
|
||||
@@ -188,7 +185,7 @@ struct LiveView: View {
|
||||
}
|
||||
|
||||
private func onCreateSuccess(response: CreateLiveRoomResponse) {
|
||||
viewModel.getSummary()
|
||||
viewModel.getLiveMain()
|
||||
if let _ = response.channelName {
|
||||
viewModel.enterRoom(roomId: response.id!)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user