라이브

- 우측 하단 옵션 버튼 순서 변경
This commit is contained in:
Yu Sung 2024-10-29 14:30:05 +09:00
parent 1fa2d1cb0d
commit 90d6c1e034
1 changed files with 48 additions and 44 deletions

View File

@ -181,7 +181,6 @@ struct LiveRoomViewV2: View {
VStack(alignment: .trailing, spacing: 0) { VStack(alignment: .trailing, spacing: 0) {
Spacer() Spacer()
ZStack(alignment: .bottom) {
LiveRoomRightBottomButton( LiveRoomRightBottomButton(
imageName: viewModel.isSpeakerMute ? "ic_speaker_off" : "ic_speaker_on", imageName: viewModel.isSpeakerMute ? "ic_speaker_off" : "ic_speaker_on",
onClick: { viewModel.toggleSpeakerMute() } onClick: { viewModel.toggleSpeakerMute() }
@ -189,25 +188,26 @@ struct LiveRoomViewV2: View {
.padding(.bottom, 40) .padding(.bottom, 40)
.padding(.trailing, 13.3) .padding(.trailing, 13.3)
ForEach(viewModel.hearts) { heart in ZStack(alignment: .bottom) {
LiveRoomHeartView(heart: heart) VStack(spacing: 13.3) {
.offset(x: heart.offsetX, y: heart.offsetY) if viewModel.role == .SPEAKER {
.opacity(heart.opacity) LiveRoomRightBottomButton(
} imageName: viewModel.isMute ? "ic_mic_off" : "ic_mic_on",
onClick: { viewModel.toggleMute() }
)
} }
VStack(spacing: 13.3) { LiveRoomRightBottomButton(
imageName: "ic_donation_message_list",
onClick: { viewModel.isShowDonationMessagePopup = true }
)
if liveRoomInfo.creatorId == UserDefaults.int(forKey: .userId) { if liveRoomInfo.creatorId == UserDefaults.int(forKey: .userId) {
LiveRoomRightBottomButton( LiveRoomRightBottomButton(
imageName: "ic_roulette_settings", imageName: "ic_roulette_settings",
onClick: { viewModel.isShowRouletteSettings = true } onClick: { viewModel.isShowRouletteSettings = true }
) )
} else { } else {
LiveRoomRightBottomButton(
imageName: "ic_heart_pink",
onClick: { viewModel.likeHeart() }
)
if viewModel.isActiveRoulette { if viewModel.isActiveRoulette {
LiveRoomRightBottomButton( LiveRoomRightBottomButton(
imageName: "ic_roulette", imageName: "ic_roulette",
@ -216,11 +216,6 @@ struct LiveRoomViewV2: View {
} }
} }
LiveRoomRightBottomButton(
imageName: "ic_donation_message_list",
onClick: { viewModel.isShowDonationMessagePopup = true }
)
if liveRoomInfo.creatorId != UserDefaults.int(forKey: .userId) { if liveRoomInfo.creatorId != UserDefaults.int(forKey: .userId) {
LiveRoomRightBottomButton( LiveRoomRightBottomButton(
imageName: "ic_donation", imageName: "ic_donation",
@ -228,13 +223,22 @@ struct LiveRoomViewV2: View {
) )
} }
if viewModel.role == .SPEAKER { if liveRoomInfo.creatorId != UserDefaults.int(forKey: .userId) {
LiveRoomRightBottomButton( LiveRoomRightBottomButton(
imageName: viewModel.isMute ? "ic_mic_off" : "ic_mic_on", imageName: "ic_heart_pink",
onClick: { viewModel.toggleMute() } onClick: { viewModel.likeHeart() }
) )
} }
} }
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) .padding(.trailing, 13.3)
LiveRoomInputChatView { LiveRoomInputChatView {