Updated on 2026-08-14
This commit is contained in:
parent
f9ae0d5188
commit
269a6d1d57
21 changed files with 240 additions and 40 deletions
|
|
@ -19,6 +19,7 @@ import com.tangem.feature.wallet.presentation.common.WalletPreviewData.topBarCon
|
|||
import com.tangem.feature.wallet.presentation.wallet.state.model.*
|
||||
import com.tangem.utils.StringsSigns.DASH_SIGN
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import kotlinx.collections.immutable.toPersistentList
|
||||
|
||||
internal object WalletScreenPreviewData {
|
||||
private val tokenItemState = TokenItemState.Content(
|
||||
|
|
@ -86,17 +87,17 @@ internal object WalletScreenPreviewData {
|
|||
private val portfolioContentState = WalletTokensListState.ContentState.PortfolioContent(
|
||||
items = persistentListOf(
|
||||
TokensListItemUM.Portfolio(
|
||||
tokens = textContentTokensState.items.filterIsInstance<PortfolioTokensListItemUM>(),
|
||||
tokens = textContentTokensState.items.filterIsInstance<PortfolioTokensListItemUM>().toPersistentList(),
|
||||
isExpanded = false,
|
||||
isCollapsable = true,
|
||||
state = AccountItemPreviewData.accountItem
|
||||
tokenItemUM = AccountItemPreviewData.accountItem
|
||||
.copy(iconState = AccountItemPreviewData.accountLetterIcon),
|
||||
),
|
||||
TokensListItemUM.Portfolio(
|
||||
tokens = textContentTokensState.items.filterIsInstance<PortfolioTokensListItemUM>(),
|
||||
tokens = textContentTokensState.items.filterIsInstance<PortfolioTokensListItemUM>().toPersistentList(),
|
||||
isExpanded = true,
|
||||
isCollapsable = true,
|
||||
state = AccountItemPreviewData.accountItem,
|
||||
tokenItemUM = AccountItemPreviewData.accountItem,
|
||||
),
|
||||
),
|
||||
organizeTokensButtonConfig = WalletTokensListState.OrganizeTokensButtonConfig(
|
||||
|
|
|
|||
|
|
@ -112,10 +112,10 @@ internal class TokenListStateConverter(
|
|||
is WalletTokensListState.Empty -> listOf()
|
||||
}
|
||||
return TokensListItemUM.Portfolio(
|
||||
state = accountItem,
|
||||
tokenItemUM = accountItem,
|
||||
isExpanded = isExtend,
|
||||
isCollapsable = true,
|
||||
tokens = items.filterIsInstance<PortfolioTokensListItemUM>(),
|
||||
tokens = items.filterIsInstance<PortfolioTokensListItemUM>().toPersistentList(),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue