diff --git a/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/CreateWalletSelectionModel.kt b/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/CreateWalletSelectionModel.kt index 10e571261d..26ce10e204 100644 --- a/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/CreateWalletSelectionModel.kt +++ b/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/CreateWalletSelectionModel.kt @@ -70,6 +70,17 @@ internal class CreateWalletSelectionModel @Inject constructor( ), ) + init { + showAlreadyHaveWalletWithDelay() + } + + private fun showAlreadyHaveWalletWithDelay() { + modelScope.launch { + delay(SHOW_ALREADY_HAVE_WALLET_DELAY) + uiState.update { it.copy(showAlreadyHaveWallet = true) } + } + } + private fun onMobileWalletClick() { router.push(AppRoute.CreateMobileWallet) } @@ -181,4 +192,8 @@ internal class CreateWalletSelectionModel @Inject constructor( ), ) } + + companion object { + private const val SHOW_ALREADY_HAVE_WALLET_DELAY = 3000L + } } \ No newline at end of file diff --git a/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/entity/CreateWalletSelectionUM.kt b/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/entity/CreateWalletSelectionUM.kt index 38affd1226..ef14600b7a 100644 --- a/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/entity/CreateWalletSelectionUM.kt +++ b/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/entity/CreateWalletSelectionUM.kt @@ -3,6 +3,7 @@ package com.tangem.features.createwalletselection.entity internal data class CreateWalletSelectionUM( val isScanInProgress: Boolean = false, val hardwareWalletPrice: String = "$54.90", + val showAlreadyHaveWallet: Boolean = false, val onBackClick: () -> Unit, val onMobileWalletClick: () -> Unit, val onHardwareWalletClick: () -> Unit, diff --git a/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/ui/CreateWalletSelectionContent.kt b/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/ui/CreateWalletSelectionContent.kt index abae1d96ad..cc4e15fb2a 100644 --- a/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/ui/CreateWalletSelectionContent.kt +++ b/features/create-wallet-selection/impl/src/main/kotlin/com/tangem/features/createwalletselection/ui/CreateWalletSelectionContent.kt @@ -1,6 +1,7 @@ package com.tangem.features.createwalletselection.ui import android.content.res.Configuration +import androidx.compose.animation.AnimatedVisibility import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.* @@ -128,10 +129,12 @@ internal fun CreateWalletSelectionContent(state: CreateWalletSelectionUM, modifi onClick = state.onHardwareWalletClick, ) } - AlreadyHaveTangemWalletBlock( - onScanClick = state.onScanClick, - isScanInProgress = state.isScanInProgress, - ) + AnimatedVisibility(state.showAlreadyHaveWallet) { + AlreadyHaveTangemWalletBlock( + onScanClick = state.onScanClick, + isScanInProgress = state.isScanInProgress, + ) + } } } @@ -238,6 +241,7 @@ private fun PreviewCreateWalletContent() { TangemThemePreview { CreateWalletSelectionContent( state = CreateWalletSelectionUM( + showAlreadyHaveWallet = true, onBackClick = {}, onMobileWalletClick = {}, onHardwareWalletClick = {},