feat: send from contact details
This commit is contained in:
@@ -537,19 +537,30 @@ fun WalletScreen(
|
||||
composable(
|
||||
route = ROUTE_CONTACT_DETAIL,
|
||||
arguments = listOf(navArgument("contactId") { type = NavType.StringType }),
|
||||
enterTransition = { fadeIn(animationSpec = tween(150)) },
|
||||
enterTransition = { fadeIn(animationSpec = tween(150)) },
|
||||
popExitTransition = { fadeOut(animationSpec = tween(150)) }
|
||||
) { backStackEntry ->
|
||||
val contactId = backStackEntry.arguments?.getString("contactId") ?: ""
|
||||
val detailVm: ContactDetailViewModel = viewModel(
|
||||
key = contactId,
|
||||
key = contactId,
|
||||
factory = ContactDetailViewModel.Factory(contactId, vm.contactRepo)
|
||||
)
|
||||
ContactDetailScreen(
|
||||
viewModel = detailVm,
|
||||
onBack = { navController.popBackStack() }
|
||||
onBack = { navController.popBackStack() },
|
||||
onPayAddress = { address ->
|
||||
vm.prefillSend(address)
|
||||
navController.navigate(TabItem.Send.route) {
|
||||
popUpTo(navController.graph.findStartDestination().id) {
|
||||
saveState = true
|
||||
}
|
||||
launchSingleTop = true
|
||||
restoreState = false // don't restore stale SendScreen state
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ── Clipboard banner — floats over content, slides in from top ────
|
||||
|
||||
Reference in New Issue
Block a user