TP-83251 | Narayan | Collect request navigation fix (#12541)
This commit is contained in:
committed by
GitHub
parent
a04ff26a74
commit
cc03800664
@@ -34,7 +34,9 @@ import com.navi.pay.utils.REQUEST_TYPE_MANDATE
|
||||
import com.navi.pay.utils.refresh
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import javax.inject.Inject
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.flow.MutableSharedFlow
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.asSharedFlow
|
||||
@@ -215,10 +217,6 @@ constructor(
|
||||
)
|
||||
}
|
||||
|
||||
updateCollectRequestUIState(
|
||||
uiState = CollectRequestUIState.Loaded(collectRequests = pendingTransactions)
|
||||
)
|
||||
|
||||
val navigateToSendMoneyScreen =
|
||||
NavigateToNextScreenFromCollectRequestScreen.SendMoneyScreenDestination(
|
||||
payeeEntity = collectRequestEntity.payeeEntity,
|
||||
@@ -227,6 +225,13 @@ constructor(
|
||||
)
|
||||
|
||||
updateNavigateToNextScreen(navigateToNextScreen = navigateToSendMoneyScreen)
|
||||
|
||||
// To ensure page goes to loaded state after navigation
|
||||
delay(500.milliseconds)
|
||||
|
||||
updateCollectRequestUIState(
|
||||
uiState = CollectRequestUIState.Loaded(collectRequests = pendingTransactions)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user