From e95d152e452d4ede61c9816f81b6b471e6e72a36 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Fri, 15 Mar 2024 00:56:49 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EA=B2=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20-=20=EB=B3=B8=EC=9D=B8=EC=9D=B4=20?= =?UTF-8?q?=EC=8A=A4=ED=94=BC=EC=BB=A4=EC=9D=BC=20=EB=95=8C=20=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=EB=84=88=EB=A1=9C=20=EB=B3=80=EA=B2=BD=ED=95=98?= =?UTF-8?q?=EB=8A=94=20=EB=B2=84=ED=8A=BC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Button/LiveRoomOverlayStrokeTextButton.swift | 2 +- .../V2/Component/View/LiveRoomInfoGuestView.swift | 14 +++++++++++++- SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift | 3 +++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/SodaLive/Sources/Live/Room/V2/Component/Button/LiveRoomOverlayStrokeTextButton.swift b/SodaLive/Sources/Live/Room/V2/Component/Button/LiveRoomOverlayStrokeTextButton.swift index 8e8d866..39e7749 100644 --- a/SodaLive/Sources/Live/Room/V2/Component/Button/LiveRoomOverlayStrokeTextButton.swift +++ b/SodaLive/Sources/Live/Room/V2/Component/Button/LiveRoomOverlayStrokeTextButton.swift @@ -20,7 +20,7 @@ struct LiveRoomOverlayStrokeTextButton: View { var body: some View { Text(text) .font(.custom(Font.medium.rawValue, size: 12)) - .foregroundColor(Color.red) + .foregroundColor(textColor) .padding(.horizontal, 8) .padding(.vertical, 6) .overlay( diff --git a/SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift b/SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift index da0bb02..cceea9a 100644 --- a/SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift +++ b/SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift @@ -35,6 +35,7 @@ struct LiveRoomInfoGuestView: View { let onClickNotice: () -> Void let onClickMenuPan: () -> Void let onClickTotalDonation: () -> Void + let onClickChangeListener: () -> Void var body: some View { ZStack { @@ -50,6 +51,16 @@ struct LiveRoomInfoGuestView: View { Spacer() + if speakerList.contains(where: { $0.id == UserDefaults.int(forKey: .userId)}) { + LiveRoomOverlayStrokeTextButton( + text: "리스너 변경", + textColor: Color.grayee, + strokeColor: Color.graybb, + strokeWidth: 1, + strokeCornerRadius: 5.3 + ) { onClickChangeListener() } + } + LiveRoomOverlayStrokeTextToggleButton( isOn: isOnBg, onText: "배경 ON", @@ -205,7 +216,8 @@ struct LiveRoomInfoGuestView_Previews: PreviewProvider { onClickProfile: { _ in }, onClickNotice: {}, onClickMenuPan: {}, - onClickTotalDonation: {} + onClickTotalDonation: {}, + onClickChangeListener: {} ) } } diff --git a/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift b/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift index f1be537..2788d9e 100644 --- a/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift +++ b/SodaLive/Sources/Live/Room/V2/LiveRoomViewV2.swift @@ -113,6 +113,9 @@ struct LiveRoomViewV2: View { }, onClickTotalDonation: { viewModel.isShowDonationRankingPopup = true + }, + onClickChangeListener: { + viewModel.setListener() } ) }