NTP-62863 | add personalised_offer changes (#16236)
Co-authored-by: Kamalesh Garnayak <Kamalesh.Garnayak@navi.com> Co-authored-by: ayushmansharma <ayushman.sharma@navi.com>
This commit is contained in:
committed by
GitHub
parent
a5e33c10da
commit
b65ccba55f
@@ -40,7 +40,6 @@ import com.navi.common.model.UploadDataAsyncResponse
|
||||
import com.navi.common.network.models.SuccessResponse
|
||||
import com.navi.common.utils.SingleLiveEvent
|
||||
import com.navi.naviwidgets.models.response.CSATResponse
|
||||
import com.navi.rr.common.network.di.V1
|
||||
import com.navi.rr.common.network.di.V2
|
||||
import com.navi.rr.scratchcard.helper.ScratchCardNudgeHelper
|
||||
import com.navi.rr.scratchcard.helper.SpecialRewardType
|
||||
@@ -61,7 +60,6 @@ class OrderStatusViewModel
|
||||
constructor(
|
||||
private val repository: OrderStatusRepository,
|
||||
private val cartUseCase: CartUseCase,
|
||||
@V1 private val scratchCardNudgeHelperV1: ScratchCardNudgeHelper,
|
||||
@V2 private val scratchCardNudgeHelperV2: ScratchCardNudgeHelper,
|
||||
) : BaseAmcVM() {
|
||||
private val _orderStatusScreenData = MutableLiveData<OrderStatusScreenData?>()
|
||||
@@ -462,11 +460,16 @@ constructor(
|
||||
SpecialRewardType.IPL_REWARD -> {
|
||||
processIplRewardGratification(requestId = requestId, screenName = screenName)
|
||||
}
|
||||
|
||||
else -> {
|
||||
// no rewards in personalised offer special Reward
|
||||
processRewardGratification(requestId = requestId, screenName = screenName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private suspend fun processRewardGratification(requestId: String, screenName: String) {
|
||||
scratchCardNudgeHelperV1
|
||||
scratchCardNudgeHelperV2
|
||||
.getGratification(requestId = requestId, screenName = screenName)
|
||||
.collect {
|
||||
processRewardGratificationCallback(
|
||||
|
||||
Reference in New Issue
Block a user