Updated on 2026-08-14
This commit is contained in:
parent
069605e151
commit
36516c900f
234 changed files with 902 additions and 1618 deletions
|
|
@ -106,9 +106,7 @@ internal class WelcomeMiddleware {
|
|||
}
|
||||
}
|
||||
|
||||
private suspend inline fun scanCardInternal(
|
||||
crossinline onCardScanned: suspend (ScanResponse) -> Unit,
|
||||
) {
|
||||
private suspend inline fun scanCardInternal(crossinline onCardScanned: suspend (ScanResponse) -> Unit) {
|
||||
tangemSdkManager.setAccessCodeRequestPolicy(
|
||||
useBiometricsForAccessCode = preferencesStorage.shouldSaveAccessCodes,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@ internal object WelcomeReducer {
|
|||
fun reduce(action: Action, state: AppState): WelcomeState {
|
||||
return if (action is WelcomeAction) {
|
||||
internalReduce(action, state.welcomeState)
|
||||
} else state.welcomeState
|
||||
} else {
|
||||
state.welcomeState
|
||||
}
|
||||
}
|
||||
|
||||
private fun internalReduce(action: WelcomeAction, state: WelcomeState): WelcomeState {
|
||||
|
|
|
|||
|
|
@ -45,10 +45,7 @@ internal class WelcomeFragment : ComposeFragment<WelcomeScreenState>() {
|
|||
}
|
||||
|
||||
@Composable
|
||||
override fun ScreenContent(
|
||||
state: WelcomeScreenState,
|
||||
modifier: Modifier,
|
||||
) {
|
||||
override fun ScreenContent(state: WelcomeScreenState, modifier: Modifier) {
|
||||
val snackbarHostState = remember { SnackbarHostState() }
|
||||
val errorMessage by rememberUpdatedState(newValue = state.error?.resolveReference())
|
||||
val warning by rememberUpdatedState(newValue = state.warning)
|
||||
|
|
|
|||
|
|
@ -12,9 +12,7 @@ import com.tangem.tap.features.welcome.ui.model.WarningModel
|
|||
import com.tangem.wallet.R
|
||||
|
||||
@Composable
|
||||
internal fun WarningDialog(
|
||||
warning: WarningModel?,
|
||||
) {
|
||||
internal fun WarningDialog(warning: WarningModel?) {
|
||||
when (warning) {
|
||||
null -> Unit
|
||||
is WarningModel.BiometricsLockoutWarning -> {
|
||||
|
|
@ -50,9 +48,7 @@ internal fun WarningDialog(
|
|||
|
||||
// region Preview
|
||||
@Composable
|
||||
private fun BiometricsLockoutDialogSample(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
private fun BiometricsLockoutDialogSample(modifier: Modifier = Modifier) {
|
||||
Column(modifier = modifier) {
|
||||
WarningDialog(
|
||||
warning = WarningModel.BiometricsLockoutWarning(
|
||||
|
|
@ -80,9 +76,7 @@ private fun BiometricsLockoutDialogPreview_Dark() {
|
|||
}
|
||||
|
||||
@Composable
|
||||
private fun BiometricsLockoutDialog_Permanent_Sample(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
private fun BiometricsLockoutDialog_Permanent_Sample(modifier: Modifier = Modifier) {
|
||||
Column(modifier = modifier) {
|
||||
WarningDialog(
|
||||
warning = WarningModel.BiometricsLockoutWarning(
|
||||
|
|
@ -111,9 +105,7 @@ private fun BiometricsLockoutDialog_Permanent_Preview_Dark() {
|
|||
|
||||
// region Preview
|
||||
@Composable
|
||||
private fun KeyInvalidatedWarningSample(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
private fun KeyInvalidatedWarningSample(modifier: Modifier = Modifier) {
|
||||
Column(modifier = modifier) {
|
||||
WarningDialog(warning = WarningModel.KeyInvalidatedWarning(onDismiss = {}))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,9 +91,7 @@ internal fun WelcomeScreenContent(
|
|||
|
||||
// region Preview
|
||||
@Composable
|
||||
private fun WelcomeScreenContentSample(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
private fun WelcomeScreenContentSample(modifier: Modifier = Modifier) {
|
||||
Box(
|
||||
modifier = modifier
|
||||
.background(TangemTheme.colors.background.primary),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue