From 8c20ce9c6232e7f4af806685fd12a8e782a9f830 Mon Sep 17 00:00:00 2001 From: Yu Sung <hwchon1234@gmail.com> Date: Fri, 15 Sep 2023 18:27:53 +0900 Subject: [PATCH] =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EB=B8=8C=20=EB=B0=A9=20-=20?= =?UTF-8?q?=EB=B0=B0=EB=84=88=20=EA=B4=91=EA=B3=A0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SodaLive/Sources/Debug/Utils/Constants.swift | 1 + SodaLive/Sources/Live/Room/LiveRoomView.swift | 11 +++++++++-- SodaLive/Sources/Utils/Constants.swift | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/SodaLive/Sources/Debug/Utils/Constants.swift b/SodaLive/Sources/Debug/Utils/Constants.swift index 8cf97ac..49c211d 100644 --- a/SodaLive/Sources/Debug/Utils/Constants.swift +++ b/SodaLive/Sources/Debug/Utils/Constants.swift @@ -22,3 +22,4 @@ let FOLLOWING_CHANNEL_LIST_BANNER_AD_UNIT_ID = "ca-app-pub-3940256099942544/2934 let LIVE_NOW_ALL_LIST_BANNER_AD_UNIT_ID = "ca-app-pub-3940256099942544/2934735716" let CREATOR_CHANNEL_BANNER_AD_UNIT_ID = "ca-app-pub-3940256099942544/2934735716" let MESSAGE_BANNER_AD_UNIT_ID = "ca-app-pub-3940256099942544/2934735716" +let LIVE_ROOM_BANNER_AD_UNIT_ID = "ca-app-pub-3940256099942544/2934735716" diff --git a/SodaLive/Sources/Live/Room/LiveRoomView.swift b/SodaLive/Sources/Live/Room/LiveRoomView.swift index c284eb0..e9ccce2 100644 --- a/SodaLive/Sources/Live/Room/LiveRoomView.swift +++ b/SodaLive/Sources/Live/Room/LiveRoomView.swift @@ -8,6 +8,7 @@ import SwiftUI import Kingfisher import PopupView +import GoogleMobileAds struct LiveRoomView: View { @State private var isShowingNewChat = false @@ -288,7 +289,13 @@ struct LiveRoomView: View { InputChatView { isShowingNewChat = false proxy.scrollTo(viewModel.messages.count - 1, anchor: .center) - }.padding(.bottom, keyboardHandler.keyboardHeight > 0 ? 0 : 15) + } + + BannerAdView(adUnitId: LIVE_ROOM_BANNER_AD_UNIT_ID) + .frame( + width: screenSize().width, + height: keyboardHandler.keyboardHeight <= 10 ? GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(screenSize().width).size.height : 0.2 + ) } VStack(spacing: 13.3) { @@ -339,7 +346,7 @@ struct LiveRoomView: View { } } .padding(.trailing, 16.7) - .padding(.bottom, 85) + .padding(.bottom, keyboardHandler.keyboardHeight > 0 ? 85 : 143) if isShowingNewChat { NewChatView{ diff --git a/SodaLive/Sources/Utils/Constants.swift b/SodaLive/Sources/Utils/Constants.swift index 3bec739..cce5945 100644 --- a/SodaLive/Sources/Utils/Constants.swift +++ b/SodaLive/Sources/Utils/Constants.swift @@ -22,3 +22,4 @@ let FOLLOWING_CHANNEL_LIST_BANNER_AD_UNIT_ID = "ca-app-pub-1299501215847962/2254 let LIVE_NOW_ALL_LIST_BANNER_AD_UNIT_ID = "ca-app-pub-1299501215847962/2446123029" let CREATOR_CHANNEL_BANNER_AD_UNIT_ID = "ca-app-pub-1299501215847962/3614614905" let MESSAGE_BANNER_AD_UNIT_ID = "ca-app-pub-1299501215847962/6432349937" +let LIVE_ROOM_BANNER_AD_UNIT_ID = "ca-app-pub-1299501215847962/1111778485"