From 90d6c1e034bd6a7327c022809eab9118cb6bd791 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Tue, 29 Oct 2024 14:30:05 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20-=20=EC=9A=B0?= =?UTF-8?q?=EC=B8=A1=20=ED=95=98=EB=8B=A8=20=EC=98=B5=EC=85=98=20=EB=B2=84?= =?UTF-8?q?=ED=8A=BC=20=EC=88=9C=EC=84=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sources/Live/Room/V2/LiveRoomViewV2.swift | 92 ++++++++++--------- 1 file changed, 48 insertions(+), 44 deletions(-) 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)