Updated on 2026-08-14
This commit is contained in:
parent
1959636f2e
commit
4b62c933bf
17 changed files with 48 additions and 49 deletions
|
|
@ -29,7 +29,7 @@ internal class PreviewWalletSettingsComponent : WalletSettingsComponent {
|
|||
|
||||
private val accountItem: UserWalletItemUM
|
||||
get() = UserWalletItemUM(
|
||||
id = UserWalletId(UUID.randomUUID().toString().encodeToByteArray()),
|
||||
id = UUID.randomUUID().toString(),
|
||||
name = accountName,
|
||||
information = UserWalletItemUM.Information.Loaded(stringReference("12 tokens")),
|
||||
balance = UserWalletItemUM.Balance.Loaded("$726.04", false),
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ internal sealed class WalletSettingsAccountsUM : WalletSettingsItemUM() {
|
|||
data class Account(
|
||||
val state: UserWalletItemUM,
|
||||
) : WalletSettingsAccountsUM() {
|
||||
override val id: String get() = state.id.stringValue
|
||||
override val id: String = state.id
|
||||
}
|
||||
|
||||
data class Footer(
|
||||
|
|
|
|||
|
|
@ -448,7 +448,7 @@ internal class WalletSettingsModel @Inject constructor(
|
|||
val id = (it as? WalletSettingsAccountsUM.Account)?.state?.id
|
||||
?: return@mapNotNull null
|
||||
|
||||
AccountId.forCryptoPortfolio(userWalletId = params.userWalletId, value = id.stringValue).getOrNull()
|
||||
AccountId.forCryptoPortfolio(userWalletId = params.userWalletId, value = id).getOrNull()
|
||||
}
|
||||
|
||||
accountListSortingSaver.save(accountIds = accountIds)
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ private fun Content(state: WalletSettingsUM, modifier: Modifier = Modifier) {
|
|||
items(
|
||||
items = state.items,
|
||||
key = WalletSettingsItemUM::id,
|
||||
contentType = { it::class.java },
|
||||
) { item ->
|
||||
val offsetModifier = when (item) {
|
||||
is WalletSettingsAccountsUM.Account,
|
||||
|
|
@ -335,6 +336,7 @@ private fun LazyItemScope.AccountItem(
|
|||
ReorderableItem(
|
||||
state = reorderableListState,
|
||||
key = model.id,
|
||||
modifier = modifier,
|
||||
) { isDragging ->
|
||||
val elevation by animateDpAsState(if (isDragging) 9.dp else 0.dp)
|
||||
val scale by animateFloatAsState(if (isDragging) 1.04f else 1f)
|
||||
|
|
@ -343,7 +345,7 @@ private fun LazyItemScope.AccountItem(
|
|||
Surface(
|
||||
shape = RoundedCornerShape(shapeRadius),
|
||||
shadowElevation = elevation,
|
||||
modifier = modifier.scale(scale),
|
||||
modifier = Modifier.scale(scale),
|
||||
) {
|
||||
UserWalletItem(
|
||||
state = model.state,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue