refactor(ads): Yandex 광고 코드와 SDK 의존성을 제거한다

This commit is contained in:
Yu Sung
2026-10-13 16:01:00 +09:00
parent c3b0d6e3f4
commit 9478565a04
21 changed files with 27 additions and 651 deletions
@@ -277,21 +277,6 @@ final class ChatRoomViewModel: ObservableObject {
purchaseChatQuota(chargeType: .can, canOption: canOption)
}
func showRewardedAdForChatQuota() {
_Concurrency.Task {
let isShown = await YandexRewardedAdManager.shared.showAdIfAvailable(for: .chatRoomQuota) { [weak self] in
self?.purchaseChatQuota(chargeType: .ad, canOption: nil)
}
if !isShown {
await MainActor.run {
errorMessage = I18n.Chat.Room.rewardedAdLoadFailed
isShowPopup = true
}
}
}
}
private func purchaseChatQuota(
chargeType: ChatRoomQuotaChargeType,
canOption: ChatRoomQuotaCanOption?
@@ -467,15 +452,6 @@ final class ChatRoomViewModel: ObservableObject {
private func updateQuota(totalRemaining: Int) {
self.totalRemaining = totalRemaining
showQuotaNoticeView = totalRemaining <= 0
prepareRewardedAdIfNeeded(totalRemaining: totalRemaining)
}
private func prepareRewardedAdIfNeeded(totalRemaining: Int) {
guard totalRemaining <= 1 else { return }
_Concurrency.Task {
await YandexRewardedAdManager.shared.preloadAd(for: .chatRoomQuota)
}
}
private func getSavedBackgroundImageId() -> Int? {
@@ -21,7 +21,6 @@ struct ChatQuotaPurchaseRequest: Encodable {
enum ChatRoomQuotaChargeType: String, Encodable {
case can = "CAN"
case ad = "AD"
}
enum ChatRoomQuotaCanOption: String, Encodable {
@@ -15,10 +15,6 @@ struct TalkView: View {
BaseView(isLoading: $viewModel.isLoading) {
ScrollView(.vertical, showsIndicators: false) {
LazyVStack(spacing: 24) {
YandexInlineBannerView(
placement: .chatTalkTabTop,
horizontalPadding: 24
)
if viewModel.talkRooms.isEmpty {
Text(I18n.Chat.Talk.emptyMessage)