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"