Updated on 2026-08-14

This commit is contained in:
Tangem 2026-07-03 23:05:18 +05:00
parent 69369cb0ae
commit 49cd9db8da
3 changed files with 9 additions and 2 deletions

View file

@ -74,7 +74,7 @@ internal class AddTokenUiBuilder @Inject constructor(
isEnabled = isAvailableNetwork,
showProgress = false,
isTangemIconVisible = isTangemIconVisible,
text = resourceReference(R.string.common_add),
text = resourceReference(R.string.common_confirm),
onConfirmClick = onConfirmClick,
)
val networkUM = createNetwork(selectedNetwork)

View file

@ -190,8 +190,10 @@ internal class DefaultManageFundsComponent @AssistedInject constructor(
onBackClick: () -> Unit,
onCloseClick: () -> Unit,
) {
val spec = route.uiSpec(model.flowType)
TangemTopBar(
title = route.uiSpec(model.flowType).title,
title = spec.title,
subtitle = spec.subtitle,
type = TangemTopBarType.BottomSheet,
startContent = if (canGoBack) {
{

View file

@ -7,6 +7,7 @@ import com.tangem.features.commonfeatures.impl.R
internal data class ManageFundsRouteUiSpec(
val title: TextReference,
val subtitle: TextReference?,
val shouldApplyHorizontalPadding: Boolean,
val shouldFillHeight: Boolean,
)
@ -16,21 +17,25 @@ internal fun ManageFundsModel.UiRoute.uiSpec(flowType: ManageFundsComponent.Flow
return when (this) {
ManageFundsModel.UiRoute.Loading -> ManageFundsRouteUiSpec(
title = resourceReference(if (isTransfer) R.string.common_choose_token else R.string.common_add_funds),
subtitle = null,
shouldApplyHorizontalPadding = false,
shouldFillHeight = false,
)
ManageFundsModel.UiRoute.ChooseToken -> ManageFundsRouteUiSpec(
title = resourceReference(R.string.common_choose_token),
subtitle = null,
shouldApplyHorizontalPadding = false,
shouldFillHeight = true,
)
ManageFundsModel.UiRoute.UserPortfolio -> ManageFundsRouteUiSpec(
title = resourceReference(R.string.common_add_funds),
subtitle = resourceReference(R.string.common_choose_token),
shouldApplyHorizontalPadding = false,
shouldFillHeight = false,
)
ManageFundsModel.UiRoute.TokenActions -> ManageFundsRouteUiSpec(
title = resourceReference(if (isTransfer) R.string.common_transfer else R.string.common_get_token),
subtitle = null,
shouldApplyHorizontalPadding = true,
shouldFillHeight = true,
)