Updated on 2026-08-14
This commit is contained in:
parent
1b6fded61c
commit
25504da416
2 changed files with 7 additions and 3 deletions
|
|
@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue