Updated on 2026-08-14
This commit is contained in:
parent
20eba62956
commit
e92074bbb0
21 changed files with 36 additions and 75 deletions
|
|
@ -59,13 +59,14 @@ internal object SendClickIntentsStub : SendClickIntents {
|
|||
|
||||
override fun onExploreClick() {}
|
||||
|
||||
override fun onShareClick() {}
|
||||
override fun onShareClick(txUrl: String) {}
|
||||
|
||||
override fun onAmountReduceByClick(
|
||||
reduceAmountBy: BigDecimal,
|
||||
reduceAmountByDiff: BigDecimal,
|
||||
notification: Class<out NotificationUM>,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
override fun onAmountReduceToClick(reduceAmountTo: BigDecimal, notification: Class<out NotificationUM>) {}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ internal fun SendNavigationButtons(
|
|||
SendDoneButtons(
|
||||
txUrl = sendState.txUrl,
|
||||
onExploreClick = uiState.clickIntents::onExploreClick,
|
||||
onShareClick = uiState.clickIntents::onShareClick,
|
||||
onShareClick = { uiState.clickIntents.onShareClick(it) },
|
||||
isVisible = isSentState,
|
||||
)
|
||||
SendNavigationButton(
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ internal interface SendClickIntents : AmountScreenClickIntents {
|
|||
|
||||
fun onExploreClick()
|
||||
|
||||
fun onShareClick()
|
||||
fun onShareClick(txUrl: String)
|
||||
|
||||
fun onAmountReduceByClick(
|
||||
reduceAmountBy: BigDecimal,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ import com.tangem.common.ui.amountScreen.models.AmountState
|
|||
import com.tangem.common.ui.amountScreen.models.EnterAmountBoundary
|
||||
import com.tangem.common.ui.notifications.NotificationUM
|
||||
import com.tangem.core.analytics.api.AnalyticsEventHandler
|
||||
import com.tangem.core.navigation.share.ShareManager
|
||||
import com.tangem.core.ui.utils.parseBigDecimal
|
||||
import com.tangem.domain.appcurrency.GetSelectedAppCurrencyUseCase
|
||||
import com.tangem.domain.appcurrency.model.AppCurrency
|
||||
|
|
@ -106,6 +107,7 @@ internal class SendViewModel @Inject constructor(
|
|||
private val saveBlockchainErrorUseCase: SaveBlockchainErrorUseCase,
|
||||
private val getCardInfoUseCase: GetCardInfoUseCase,
|
||||
private val sendFeedbackEmailUseCase: SendFeedbackEmailUseCase,
|
||||
private val shareManager: ShareManager,
|
||||
@DelayedWork private val coroutineScope: CoroutineScope,
|
||||
validateTransactionUseCase: ValidateTransactionUseCase,
|
||||
getCurrencyCheckUseCase: GetCurrencyCheckUseCase,
|
||||
|
|
@ -863,8 +865,9 @@ internal class SendViewModel @Inject constructor(
|
|||
innerRouter.openUrl(sendState.txUrl)
|
||||
}
|
||||
|
||||
override fun onShareClick() {
|
||||
override fun onShareClick(txUrl: String) {
|
||||
analyticsEventHandler.send(SendAnalyticEvents.ShareButtonClicked)
|
||||
shareManager.shareText(txUrl)
|
||||
}
|
||||
|
||||
override fun onAmountReduceToClick(reduceAmountTo: BigDecimal, notification: Class<out NotificationUM>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue