forked from shihaam/thijooree
add api call indicator to nfc
This commit is contained in:
@@ -620,10 +620,12 @@ ViewCompat.setOnApplyWindowInsetsListener(binding.contentLayout) { v, insets ->
|
|||||||
return@launch
|
return@launch
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(activity as? HomeActivity)?.setRefreshing(true)
|
||||||
val otp = Totp.generate(otpSeed)
|
val otp = Totp.generate(otpSeed)
|
||||||
val result = withContext(Dispatchers.IO) {
|
val result = withContext(Dispatchers.IO) {
|
||||||
runCatching { BmlTapToPayClient().fetchTokens(session, item.account.internalId, otp) }
|
runCatching { BmlTapToPayClient().fetchTokens(session, item.account.internalId, otp) }
|
||||||
}
|
}
|
||||||
|
(activity as? HomeActivity)?.setRefreshing(false)
|
||||||
val token = result.getOrNull()?.firstOrNull()
|
val token = result.getOrNull()?.firstOrNull()
|
||||||
|
|
||||||
if (!isTapMode) return@launch // user cancelled while we were fetching
|
if (!isTapMode) return@launch // user cancelled while we were fetching
|
||||||
|
|||||||
Reference in New Issue
Block a user