fix(chat): 채팅 쿼터 구매 동선을 정리한다
This commit is contained in:
@@ -279,9 +279,16 @@ final class ChatRoomViewModel: ObservableObject {
|
||||
|
||||
func showRewardedAdForChatQuota() {
|
||||
_Concurrency.Task {
|
||||
await YandexRewardedAdManager.shared.showAdIfAvailable(for: .chatRoomQuota) { [weak self] in
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user