TP-72662 | PS | fixed NPS to sendmoney transition animation issue (#11701)

This commit is contained in:
Prakhar Saxena
2024-07-04 17:14:34 +05:30
committed by GitHub
parent 5eb0c6f894
commit 6f5ed2073a
2 changed files with 10 additions and 0 deletions

View File

@@ -302,6 +302,14 @@ object NaviPaySdkUtils {
}
}
fun isSourcePMS(intentData: Bundle?): Boolean {
return when (intentData?.getString(NAVI_PAY_ACTION)) {
NaviPayAction.SEND_MONEY.name,
NaviPayAction.SET_PIN.name -> true
else -> false
}
}
fun getTransactionResponse(
accountId: String? = null,
amount: String? = null,

View File

@@ -21,6 +21,7 @@ import com.navi.pay.common.utils.NaviPaySdkUtils
import com.navi.pay.entry.NaviPayActivity
import com.ramcosta.composedestinations.annotation.Destination
import com.ramcosta.composedestinations.navigation.DestinationsNavigator
import kotlinx.coroutines.delay
@Destination
@Composable
@@ -36,6 +37,7 @@ fun NaviPayEmptyHomeScreen(
sourceScreenName = intentData?.getString(SOURCE_SCREEN_NAME).orEmpty(),
bundle = intentData ?: Bundle()
)
if (NaviPaySdkUtils.isSourcePMS(intentData)) delay(100)
direction?.let { navigator.navigate(it) }
}