Updated on 2026-08-14
This commit is contained in:
commit
455b706d13
3 changed files with 19 additions and 11 deletions
|
|
@ -85,11 +85,13 @@ internal class DefaultNFTSendComponent @AssistedInject constructor(
|
||||||
) { stack ->
|
) { stack ->
|
||||||
componentScope.launch {
|
componentScope.launch {
|
||||||
when (val activeComponent = stack.active.instance) {
|
when (val activeComponent = stack.active.instance) {
|
||||||
is NFTSendConfirmComponent -> if (currentRouteFlow.value.isEditMode) {
|
is NFTSendConfirmComponent -> {
|
||||||
analyticsEventHandler.send(
|
analyticsEventHandler.send(
|
||||||
CommonSendAnalyticEvents.ConfirmationScreenOpened(categoryName = analyticsCategoryName),
|
CommonSendAnalyticEvents.ConfirmationScreenOpened(categoryName = analyticsCategoryName),
|
||||||
)
|
)
|
||||||
activeComponent.updateState(model.uiState.value)
|
if (currentRouteFlow.value.isEditMode) {
|
||||||
|
activeComponent.updateState(model.uiState.value)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
is SendDestinationComponent -> {
|
is SendDestinationComponent -> {
|
||||||
analyticsEventHandler.send(
|
analyticsEventHandler.send(
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ internal enum class EnterAddressSource {
|
||||||
PasteButton,
|
PasteButton,
|
||||||
RecentAddress,
|
RecentAddress,
|
||||||
InputField,
|
InputField,
|
||||||
|
MyWallets,
|
||||||
;
|
;
|
||||||
|
|
||||||
val isPasted: Boolean
|
val isPasted: Boolean
|
||||||
|
|
|
||||||
|
|
@ -72,9 +72,14 @@ internal fun SendDestinationContent(
|
||||||
)
|
)
|
||||||
listItem(
|
listItem(
|
||||||
list = wallets,
|
list = wallets,
|
||||||
clickIntents = clickIntents,
|
|
||||||
isLast = recipients.any { !it.isVisible },
|
isLast = recipients.any { !it.isVisible },
|
||||||
isBalanceHidden = isBalanceHidden,
|
isBalanceHidden = isBalanceHidden,
|
||||||
|
onClick = { title ->
|
||||||
|
clickIntents.onRecipientAddressValueChange(
|
||||||
|
title,
|
||||||
|
EnterAddressSource.MyWallets,
|
||||||
|
)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
listHeaderItem(
|
listHeaderItem(
|
||||||
titleRes = R.string.send_recent_transactions,
|
titleRes = R.string.send_recent_transactions,
|
||||||
|
|
@ -83,9 +88,14 @@ internal fun SendDestinationContent(
|
||||||
)
|
)
|
||||||
listItem(
|
listItem(
|
||||||
list = recipients,
|
list = recipients,
|
||||||
clickIntents = clickIntents,
|
|
||||||
isLast = true,
|
isLast = true,
|
||||||
isBalanceHidden = isBalanceHidden,
|
isBalanceHidden = isBalanceHidden,
|
||||||
|
onClick = { title ->
|
||||||
|
clickIntents.onRecipientAddressValueChange(
|
||||||
|
title,
|
||||||
|
EnterAddressSource.RecentAddress,
|
||||||
|
)
|
||||||
|
},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -182,9 +192,9 @@ private fun LazyListScope.listHeaderItem(@StringRes titleRes: Int, isVisible: Bo
|
||||||
|
|
||||||
private fun LazyListScope.listItem(
|
private fun LazyListScope.listItem(
|
||||||
list: ImmutableList<DestinationRecipientListUM>,
|
list: ImmutableList<DestinationRecipientListUM>,
|
||||||
clickIntents: SendDestinationClickIntents,
|
|
||||||
isLast: Boolean,
|
isLast: Boolean,
|
||||||
isBalanceHidden: Boolean,
|
isBalanceHidden: Boolean,
|
||||||
|
onClick: (String) -> Unit,
|
||||||
) {
|
) {
|
||||||
items(
|
items(
|
||||||
count = list.size,
|
count = list.size,
|
||||||
|
|
@ -201,12 +211,7 @@ private fun LazyListScope.listItem(
|
||||||
info = item.timestamp?.resolveReference(),
|
info = item.timestamp?.resolveReference(),
|
||||||
subtitleEndOffset = item.subtitleEndOffset,
|
subtitleEndOffset = item.subtitleEndOffset,
|
||||||
subtitleIconRes = item.subtitleIconRes,
|
subtitleIconRes = item.subtitleIconRes,
|
||||||
onClick = {
|
onClick = { onClick(title) },
|
||||||
clickIntents.onRecipientAddressValueChange(
|
|
||||||
title,
|
|
||||||
EnterAddressSource.RecentAddress,
|
|
||||||
)
|
|
||||||
},
|
|
||||||
isLoading = item.isLoading,
|
isLoading = item.isLoading,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.animateItem()
|
.animateItem()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue