Updated on 2026-08-14

This commit is contained in:
Tangem 2026-04-06 16:28:26 +03:00
parent 1b6fded61c
commit 25504da416
2 changed files with 7 additions and 3 deletions

View file

@ -17,6 +17,7 @@ import com.tangem.core.ui.ds.row.TangemRowContainer
import com.tangem.core.ui.ds.row.TangemRowLayoutId
import com.tangem.core.ui.ds.row.internal.TangemRowTail
import com.tangem.core.ui.ds.row.token.internal.*
import com.tangem.core.ui.extensions.clickableSingle
import com.tangem.core.ui.res.TangemTheme
import com.tangem.core.ui.res.TangemThemePreviewRedesign
import com.tangem.core.ui.test.TokenElementsTestTags
@ -131,6 +132,8 @@ fun TangemTokenRow(
titleComponent: @Composable (Modifier) -> Unit,
) {
TangemRowContainer(
modifier = modifier
.clickableSingle(enabled = tokenRowUM.onItemClick != null, onClick = { tokenRowUM.onItemClick?.invoke() }),
content = {
headComponent(
Modifier
@ -193,7 +196,6 @@ fun TangemTokenRow(
.testTag(tag = TokenElementsTestTags.TOKEN_NON_FIAT_BLOCK),
)
},
modifier = modifier,
)
}

View file

@ -81,8 +81,10 @@ internal class WalletTokensListUMConverter(
.asSequence()
.flatMap { accountStatus ->
if (isAccountsModeEnabled) {
val isCollapsable = accountStatus.tokenList.flattenCurrencies().isNotEmpty()
val isExpanded = expandedAccounts.contains(accountStatus.account.accountId)
val currencies = accountStatus.tokenList.flattenCurrencies()
val isCollapsable = currencies.isNotEmpty()
val isExpanded =
currencies.isEmpty() || expandedAccounts.contains(accountStatus.account.accountId)
sequenceOf(
TokensListItemUM2.Portfolio(
tokenRowUM = accountRowConverter.convert(accountStatus),