Updated on 2026-08-14
This commit is contained in:
parent
ec1e5c62fc
commit
e20e20124e
4 changed files with 17 additions and 1 deletions
|
|
@ -23,4 +23,9 @@ internal class WalletLoaderStorage @Inject constructor() {
|
|||
loaders.remove(id)
|
||||
}
|
||||
}
|
||||
|
||||
fun clear() {
|
||||
loaders.values.forEach { it.forEach(Job::cancel) }
|
||||
loaders.clear()
|
||||
}
|
||||
}
|
||||
|
|
@ -63,6 +63,11 @@ internal class WalletScreenContentLoader @Inject constructor(
|
|||
storage.remove(id)
|
||||
}
|
||||
|
||||
fun cancelAll() {
|
||||
Timber.d("All content loading is canceled")
|
||||
storage.clear()
|
||||
}
|
||||
|
||||
private fun loadInternal(
|
||||
userWallet: UserWallet,
|
||||
appCurrency: AppCurrency,
|
||||
|
|
|
|||
|
|
@ -80,6 +80,12 @@ internal class WalletViewModelV2 @Inject constructor(
|
|||
clickIntents.initialize(router, viewModelScope)
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
super.onCleared()
|
||||
stateHolder.clear()
|
||||
walletScreenContentLoader.cancelAll()
|
||||
}
|
||||
|
||||
private fun suggestToEnableBiometrics() {
|
||||
viewModelScope.launch(dispatchers.main) {
|
||||
withContext(dispatchers.io) { delay(timeMillis = 1_800) }
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ internal class WalletsUpdateActionResolverV2 @Inject constructor(
|
|||
data class ReinitializeWallets(val selectedWallet: UserWallet) : Action() {
|
||||
|
||||
override fun toString(): String {
|
||||
return "Reinitialize(selectedWallet = ${selectedWallet.walletId})"
|
||||
return "ReinitializeWallets(selectedWallet = ${selectedWallet.walletId})"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue