feat(gift): 상세 재조회와 정책 처리를 추가한다
This commit is contained in:
@@ -28,6 +28,8 @@ class GiftDetailViewModel(private val repository: GiftRepository) : BaseViewMode
|
||||
val finishErrorLiveData: LiveData<ToastMessage?> = mutableFinishError
|
||||
private val mutableInquiry = MutableLiveData(false)
|
||||
val inquiryLiveData: LiveData<Boolean> = mutableInquiry
|
||||
private val mutableToast = MutableLiveData<ToastMessage?>()
|
||||
val toastLiveData: LiveData<ToastMessage?> = mutableToast
|
||||
private var applicationNo: String? = null
|
||||
private var pendingCancellation: GiftCancelResponse? = null
|
||||
|
||||
@@ -47,6 +49,10 @@ class GiftDetailViewModel(private val repository: GiftRepository) : BaseViewMode
|
||||
load(number)
|
||||
}
|
||||
|
||||
fun reloadAfterRecipientAddressSuccess() {
|
||||
retry()
|
||||
}
|
||||
|
||||
fun consumeFinishError(): ToastMessage? = mutableFinishError.value.also { mutableFinishError.value = null }
|
||||
|
||||
fun applyCancellation(cancel: GiftCancelResponse) {
|
||||
@@ -66,6 +72,12 @@ class GiftDetailViewModel(private val repository: GiftRepository) : BaseViewMode
|
||||
mutableInquiry.value = true
|
||||
}
|
||||
|
||||
fun onPolicyClick() {
|
||||
mutableToast.value = ToastMessage(resId = R.string.creator_channel_more_ready)
|
||||
}
|
||||
|
||||
fun consumeToast(): ToastMessage? = mutableToast.value.also { mutableToast.value = null }
|
||||
|
||||
fun consumeInquiryIntent(): Intent? {
|
||||
if (mutableInquiry.value != true) return null
|
||||
mutableInquiry.value = false
|
||||
|
||||
Reference in New Issue
Block a user