Updated on 2026-08-14

This commit is contained in:
Tangem 2024-10-21 12:48:51 +04:00
parent c12ce8c241
commit 2d3f107d90
2 changed files with 3 additions and 13 deletions

View file

@ -181,11 +181,7 @@ private fun WalletContent(
contentPadding = contentPadding,
horizontalAlignment = Alignment.CenterHorizontally,
) {
item(
// !!! Type of the key should be saveable via Bundle on Android !!!
key = state.wallets.map { it.walletCardState.id.stringValue },
contentType = state.wallets.map { it.walletCardState.id },
) {
item(key = "WalletsList" + state.selectedWalletIndex, contentType = "WalletsList") {
WalletsList(
lazyListState = walletsListState,
wallets = state.wallets.map(WalletState::walletCardState).toImmutableList(),

View file

@ -58,17 +58,11 @@ internal fun WalletsList(
horizontalArrangement = Arrangement.spacedBy(TangemTheme.dimens.spacing8),
flingBehavior = rememberWalletsFlingBehaviour(lazyListState = lazyListState, itemWidth = itemWidth),
) {
items(
items = wallets,
key = { it.id.stringValue },
contentType = { it.id.stringValue },
) { state ->
items(items = wallets, contentType = { it.id.stringValue }) { state ->
WalletCard(
state = state,
isBalanceHidden = isBalanceHidden,
modifier = Modifier
.animateItemPlacement()
.width(itemWidth),
modifier = Modifier.width(itemWidth),
)
}
}