diff --git a/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift b/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift index 7b38a03..a1c0778 100644 --- a/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift +++ b/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift @@ -181,59 +181,63 @@ struct LiveRoomViewV2: View { VStack(alignment: .trailing, spacing: 0) { Spacer() - ZStack(alignment: .bottom) { - LiveRoomRightBottomButton( - imageName: viewModel.isSpeakerMute ? "ic_speaker_off" : "ic_speaker_on", - onClick: { viewModel.toggleSpeakerMute() } - ) - .padding(.bottom, 40) - .padding(.trailing, 13.3) - - ForEach(viewModel.hearts) { heart in - LiveRoomHeartView(heart: heart) - .offset(x: heart.offsetX, y: heart.offsetY) - .opacity(heart.opacity) - } - } + LiveRoomRightBottomButton( + imageName: viewModel.isSpeakerMute ? "ic_speaker_off" : "ic_speaker_on", + onClick: { viewModel.toggleSpeakerMute() } + ) + .padding(.bottom, 40) + .padding(.trailing, 13.3) - VStack(spacing: 13.3) { - if liveRoomInfo.creatorId == UserDefaults.int(forKey: .userId) { + ZStack(alignment: .bottom) { + VStack(spacing: 13.3) { + if viewModel.role == .SPEAKER { + LiveRoomRightBottomButton( + imageName: viewModel.isMute ? "ic_mic_off" : "ic_mic_on", + onClick: { viewModel.toggleMute() } + ) + } + LiveRoomRightBottomButton( - imageName: "ic_roulette_settings", - onClick: { viewModel.isShowRouletteSettings = true } - ) - } else { - LiveRoomRightBottomButton( - imageName: "ic_heart_pink", - onClick: { viewModel.likeHeart() } + imageName: "ic_donation_message_list", + onClick: { viewModel.isShowDonationMessagePopup = true } ) - if viewModel.isActiveRoulette { + if liveRoomInfo.creatorId == UserDefaults.int(forKey: .userId) { LiveRoomRightBottomButton( - imageName: "ic_roulette", - onClick: { viewModel.showRoulette() } + imageName: "ic_roulette_settings", + onClick: { viewModel.isShowRouletteSettings = true } + ) + } else { + if viewModel.isActiveRoulette { + LiveRoomRightBottomButton( + imageName: "ic_roulette", + onClick: { viewModel.showRoulette() } + ) + } + } + + if liveRoomInfo.creatorId != UserDefaults.int(forKey: .userId) { + LiveRoomRightBottomButton( + imageName: "ic_donation", + onClick: { viewModel.isShowDonationPopup = true } + ) + } + + if liveRoomInfo.creatorId != UserDefaults.int(forKey: .userId) { + LiveRoomRightBottomButton( + imageName: "ic_heart_pink", + onClick: { viewModel.likeHeart() } ) } } - LiveRoomRightBottomButton( - imageName: "ic_donation_message_list", - onClick: { viewModel.isShowDonationMessagePopup = true } - ) - - if liveRoomInfo.creatorId != UserDefaults.int(forKey: .userId) { - LiveRoomRightBottomButton( - imageName: "ic_donation", - onClick: { viewModel.isShowDonationPopup = true } - ) - } - - if viewModel.role == .SPEAKER { - LiveRoomRightBottomButton( - imageName: viewModel.isMute ? "ic_mic_off" : "ic_mic_on", - onClick: { viewModel.toggleMute() } - ) - } + ZStack { + ForEach(viewModel.hearts) { heart in + LiveRoomHeartView(heart: heart) + .offset(x: heart.offsetX, y: heart.offsetY) + .opacity(heart.opacity) + } + }.padding(.bottom, 40) } .padding(.trailing, 13.3)