feat(chat): 채팅 쿼터 광고 충전을 추가한다

This commit is contained in:
Yu Sung
2026-04-30 14:23:15 +09:00
parent 714ad459b0
commit 5823f6ddb2
10 changed files with 423 additions and 133 deletions

View File

@@ -148,9 +148,17 @@ struct ChatRoomView: View {
}
if viewModel.showQuotaNoticeView {
ChatQuotaNoticeItemView(remainingTime: viewModel.countdownText) {
viewModel.purchaseChatQuota()
}
ChatQuotaNoticeItemView(
onSelectAd: {
viewModel.showRewardedAdForChatQuota()
},
onSelectCan10: {
viewModel.purchaseChatQuota(canOption: .can10)
},
onSelectCan20: {
viewModel.purchaseChatQuota(canOption: .can20)
}
)
.id("quota_\(viewModel.messages.count)")
.padding(.bottom, 12)
.onAppear {
@@ -309,9 +317,6 @@ struct ChatRoomView: View {
viewModel.getMemberInfo()
viewModel.enterRoom(roomId: roomId)
}
.onDisappear {
viewModel.stopTimer()
}
.sodaToast(isPresented: $viewModel.isShowPopup, message: viewModel.errorMessage, autohideIn: 2)
}
}