Updated on 2026-08-14
This commit is contained in:
parent
4aa6a9666b
commit
6d25b648b7
3 changed files with 24 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 = {},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue