diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/router/DefaultWalletRouter.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/router/DefaultWalletRouter.kt index cf0a846de9..67b534d11d 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/router/DefaultWalletRouter.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/router/DefaultWalletRouter.kt @@ -79,7 +79,7 @@ internal class DefaultWalletRouter(private val reduxNavController: ReduxNavContr * If backstack contains only NavGraph entry and wallet screen entry then we close the wallet fragment. */ if (navController.currentBackStack.value.size == BACKSTACK_ENTRY_COUNT_TO_CLOSE_WALLET_SCREEN) { - if (screen == AppScreen.Home) { + if (screen != null) { reduxNavController.navigate(action = NavigationAction.PopBackTo(screen)) } else { onFinish.invoke() @@ -94,8 +94,6 @@ internal class DefaultWalletRouter(private val reduxNavController: ReduxNavContr } override fun openDetailsScreen() { - // FIXME: Prepare details screen (e.g. dispatch action: `DetailsAction.PrepareScreen`) - // [REDACTED_JIRA] reduxNavController.navigate(action = NavigationAction.NavigateTo(AppScreen.Details)) } diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/common/WalletCard.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/common/WalletCard.kt index ec7c87f061..47d6b066db 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/common/WalletCard.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/ui/components/common/WalletCard.kt @@ -121,15 +121,16 @@ internal fun WalletCard(state: WalletCardState, isBalanceHidden: Boolean, modifi mutableStateOf(value = balanceWidth < itemSize.width * HALF_OF_ITEM_WIDTH) } - Image( - id = state.imageResId, - isVisible = hasSpaceForImage, - modifier = Modifier.constrainAs(imageRef) { - end.linkTo(parent.end) - bottom.linkTo(parent.bottom) - height = Dimension.fillToConstraints - }, - ) + if (hasSpaceForImage) { + Image( + id = state.imageResId, + modifier = Modifier.constrainAs(imageRef) { + end.linkTo(parent.end) + bottom.linkTo(parent.bottom) + height = Dimension.fillToConstraints + }, + ) + } } } @@ -373,8 +374,8 @@ private fun LockedContent(modifier: Modifier = Modifier) { } @Composable -private fun Image(@DrawableRes id: Int?, isVisible: Boolean, modifier: Modifier = Modifier) { - AnimatedVisibility(visible = id != null && isVisible, modifier = modifier) { +private fun Image(@DrawableRes id: Int?, modifier: Modifier = Modifier) { + AnimatedVisibility(visible = id != null, modifier = modifier) { val imageRes = id ?: return@AnimatedVisibility Image( diff --git a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/WalletViewModel.kt b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/WalletViewModel.kt index 78ed50b36f..a919b9e2dd 100644 --- a/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/WalletViewModel.kt +++ b/features/wallet/impl/src/main/java/com/tangem/feature/wallet/presentation/wallet/viewmodels/WalletViewModel.kt @@ -115,7 +115,6 @@ internal class WalletViewModel @Inject constructor( private val shouldShowSaveWalletScreenUseCase: ShouldShowSaveWalletScreenUseCase, private val canUseBiometryUseCase: CanUseBiometryUseCase, private val shouldSaveUserWalletsUseCase: ShouldSaveUserWalletsUseCase, - private val shouldSaveUserWalletsSyncUseCase: ShouldSaveUserWalletsSyncUseCase, private val isBalanceHiddenUseCase: IsBalanceHiddenUseCase, private val listenToFlipsUseCase: ListenToFlipsUseCase, private val removeCurrencyUseCase: RemoveCurrencyUseCase, @@ -297,9 +296,7 @@ internal class WalletViewModel @Inject constructor( } override fun onBackClick() { - viewModelScope.launch(dispatchers.main) { - router.popBackStack(screen = if (shouldSaveUserWalletsSyncUseCase()) AppScreen.Welcome else AppScreen.Home) - } + router.popBackStack() } override fun onGenerateMissedAddressesClick(missedAddressCurrencies: List) {