feat(gift): 상세 재조회와 정책 처리를 추가한다

This commit is contained in:
2026-10-02 23:54:53 +09:00
parent 8a25a297f1
commit 22e16a2aee
2 changed files with 46 additions and 0 deletions
@@ -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