라이브 방 추가
This commit is contained in:
@@ -14,6 +14,7 @@ struct HomeView: View {
|
||||
|
||||
@StateObject var viewModel = HomeViewModel()
|
||||
@StateObject var appState = AppState.shared
|
||||
@StateObject var contentPlayManager = ContentPlayManager.shared
|
||||
|
||||
private let liveView = LiveView()
|
||||
private let explorer = ExplorerView()
|
||||
@@ -49,6 +50,57 @@ struct HomeView: View {
|
||||
|
||||
Spacer()
|
||||
|
||||
if contentPlayManager.isShowingMiniPlayer {
|
||||
HStack(spacing: 0) {
|
||||
KFImage(URL(string: contentPlayManager.coverImage))
|
||||
.resizable()
|
||||
.frame(width: 36.7, height: 36.7)
|
||||
.cornerRadius(5.3)
|
||||
|
||||
VStack(alignment: .leading, spacing: 2.3) {
|
||||
Text(contentPlayManager.title)
|
||||
.font(.custom(Font.medium.rawValue, size: 13))
|
||||
.foregroundColor(Color(hex: "eeeeee"))
|
||||
.lineLimit(2)
|
||||
|
||||
Text(contentPlayManager.nickname)
|
||||
.font(.custom(Font.medium.rawValue, size: 11))
|
||||
.foregroundColor(Color(hex: "d2d2d2"))
|
||||
}
|
||||
.padding(.horizontal, 10.7)
|
||||
|
||||
Spacer()
|
||||
|
||||
Image(contentPlayManager.isPlaying ? "ic_noti_pause" : "btn_bar_play")
|
||||
.resizable()
|
||||
.frame(width: 25, height: 25)
|
||||
.onTapGesture {
|
||||
if contentPlayManager.isPlaying {
|
||||
contentPlayManager.pauseAudio()
|
||||
} else {
|
||||
contentPlayManager
|
||||
.playAudio(contentId: contentPlayManager.contentId)
|
||||
}
|
||||
}
|
||||
|
||||
Image("ic_noti_stop")
|
||||
.resizable()
|
||||
.frame(width: 25, height: 25)
|
||||
.padding(.leading, 16)
|
||||
.onTapGesture { contentPlayManager.stopAudio() }
|
||||
}
|
||||
.padding(.vertical, 10.7)
|
||||
.padding(.horizontal, 13.3)
|
||||
.background(Color(hex: "222222"))
|
||||
.contentShape(Rectangle())
|
||||
.onTapGesture {
|
||||
appState
|
||||
.setAppStep(
|
||||
step: .contentDetail(contentId: contentPlayManager.contentId)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
BottomTabView(width: proxy.size.width, currentTab: $viewModel.currentTab)
|
||||
|
||||
if proxy.safeAreaInsets.bottom > 0 {
|
||||
@@ -63,6 +115,10 @@ struct HomeView: View {
|
||||
viewModel.getEventPopup()
|
||||
}
|
||||
|
||||
if appState.isShowPlayer {
|
||||
LiveRoomView()
|
||||
}
|
||||
|
||||
if appState.isShowNotificationSettingsDialog {
|
||||
NotificationSettingsDialog()
|
||||
}
|
||||
|
Reference in New Issue
Block a user