|
|
@@ -101,8 +101,16 @@ class RechargeActivity : BaseActivity() {
|
|
|
super.onResume()
|
|
|
payManager.queryAndHandleUnDealPurchases()
|
|
|
rechargeViewModel.hasIDVerification().observe(this) { rlt ->
|
|
|
- hasIDVerify = (rlt as? Rlt.Success)?.data ?: false
|
|
|
- updateIDVerifyButton()
|
|
|
+ when (rlt) {
|
|
|
+ is Rlt.Failed -> {
|
|
|
+ //Ntd.
|
|
|
+ }
|
|
|
+
|
|
|
+ is Rlt.Success -> {
|
|
|
+ hasIDVerify = rlt.data
|
|
|
+ updateIDVerifyButton()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -122,7 +130,7 @@ class RechargeActivity : BaseActivity() {
|
|
|
val hasIDVerify = hasIDVerify
|
|
|
val appApproving = appApproving
|
|
|
if (hasIDVerify != null && appApproving != null) {
|
|
|
- binding.btnIdVerification.show(!hasIDVerify && !appApproving)
|
|
|
+ binding.btnIdVerification.show(hasIDVerify && !appApproving)
|
|
|
} else {
|
|
|
binding.btnIdVerification.gone()
|
|
|
}
|