fix(live-room-create): 유료 라이브 30캔 미만 생성을 차단한다

This commit is contained in:
2026-02-24 16:21:20 +09:00
parent 80959abe16
commit 63a52629a9
5 changed files with 53 additions and 1 deletions

View File

@@ -28,6 +28,10 @@ class LiveRoomCreateViewModel(
private val repository: LiveRepository
) : BaseViewModel() {
companion object {
private const val MINIMUM_PAID_PRICE = 30
}
enum class SelectedMenu {
MENU_1, MENU_2, MENU_3
}
@@ -264,11 +268,17 @@ class LiveRoomCreateViewModel(
return false
}
val price = _priceLiveData.value ?: 0
if (price in 1 until MINIMUM_PAID_PRICE) {
_toastLiveData.postValue(StringResource(R.string.msg_live_room_create_minimum_paid_price))
return false
}
return true
}
fun setPrice(price: Int) {
_priceLiveData.value = price
_priceLiveData.value = price.coerceAtLeast(0)
}
fun setAdult(isAdult: Boolean) {