fix(live-room-create): 유료 라이브 30캔 미만 생성을 차단한다
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user