Updated on 2026-08-14
This commit is contained in:
parent
6ec85eec82
commit
ad115ebb5a
3 changed files with 14 additions and 18 deletions
|
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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<CryptoCurrency>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue