Updated on 2026-08-14
This commit is contained in:
parent
ebfbfa3c41
commit
e04f0cfa26
2 changed files with 3 additions and 3 deletions
|
|
@ -17,6 +17,7 @@ import com.tangem.feature.wallet.presentation.wallet.state.model.WalletEvent
|
|||
import com.tangem.feature.wallet.presentation.wallet.ui.utils.ReviewManagerRequester
|
||||
import com.tangem.feature.wallet.presentation.wallet.ui.utils.animateScrollByIndex
|
||||
import com.tangem.feature.wallet.presentation.wallet.ui.utils.demonstrateScrolling
|
||||
import kotlinx.coroutines.delay
|
||||
|
||||
@Suppress("LongParameterList")
|
||||
@Composable
|
||||
|
|
@ -37,6 +38,7 @@ internal fun WalletEventEffect(
|
|||
onTrigger = { value ->
|
||||
when (value) {
|
||||
is WalletEvent.ChangeWallet -> {
|
||||
delay(timeMillis = 1000) // to let compose time to start drawing otherwise animation doesnt work
|
||||
onAutoScrollSet()
|
||||
walletsListState.animateScrollByIndex(prevIndex = selectedWalletIndex, newIndex = value.index)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -363,7 +363,7 @@ internal class WalletViewModel @Inject constructor(
|
|||
)
|
||||
}
|
||||
|
||||
private suspend fun addWallet(action: WalletsUpdateActionResolver.Action.AddWallet) {
|
||||
private fun addWallet(action: WalletsUpdateActionResolver.Action.AddWallet) {
|
||||
walletScreenContentLoader.load(
|
||||
userWallet = action.selectedWallet,
|
||||
clickIntents = clickIntents,
|
||||
|
|
@ -379,8 +379,6 @@ internal class WalletViewModel @Inject constructor(
|
|||
),
|
||||
)
|
||||
|
||||
withContext(dispatchers.io) { delay(timeMillis = 1000) }
|
||||
|
||||
scrollToWallet(index = action.selectedWalletIndex)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue