11package to.bitkit.ui
22
3- import androidx.compose.animation.core.tween
4- import androidx.compose.animation.slideInHorizontally
5- import androidx.compose.animation.slideOutHorizontally
63import androidx.compose.runtime.Composable
74import androidx.compose.runtime.CompositionLocalProvider
85import androidx.compose.runtime.DisposableEffect
@@ -403,7 +400,12 @@ private fun NavGraphBuilder.nodeState(
403400}
404401
405402private fun NavGraphBuilder.generalSettings (navController : NavHostController ) {
406- composable<Routes .GeneralSettings > {
403+ composable<Routes .GeneralSettings >(
404+ enterTransition = { screenSlideIn },
405+ exitTransition = { screenScaleOut },
406+ popEnterTransition = { screenScaleIn },
407+ popExitTransition = { screenSlideOut },
408+ ) {
407409 GeneralSettingsScreen (navController)
408410 }
409411}
@@ -412,7 +414,12 @@ private fun NavGraphBuilder.defaultUnitSettings(
412414 currencyViewModel : CurrencyViewModel ,
413415 navController : NavHostController ,
414416) {
415- composable<Routes .DefaultUnitSettings > {
417+ composable<Routes .DefaultUnitSettings >(
418+ enterTransition = { screenSlideIn },
419+ exitTransition = { screenScaleOut },
420+ popEnterTransition = { screenScaleIn },
421+ popExitTransition = { screenSlideOut },
422+ ) {
416423 DefaultUnitSettingsScreen (currencyViewModel, navController)
417424 }
418425}
@@ -421,39 +428,64 @@ private fun NavGraphBuilder.localCurrencySettings(
421428 currencyViewModel : CurrencyViewModel ,
422429 navController : NavHostController ,
423430) {
424- composable<Routes .LocalCurrencySettings > {
431+ composable<Routes .LocalCurrencySettings >(
432+ enterTransition = { screenSlideIn },
433+ exitTransition = { screenScaleOut },
434+ popEnterTransition = { screenScaleIn },
435+ popExitTransition = { screenSlideOut },
436+ ) {
425437 LocalCurrencySettingsScreen (currencyViewModel, navController)
426438 }
427439}
428440
429441private fun NavGraphBuilder.backupSettings (
430442 navController : NavHostController ,
431443) {
432- composable<Routes .BackupSettings > {
444+ composable<Routes .BackupSettings >(
445+ enterTransition = { screenSlideIn },
446+ exitTransition = { screenScaleOut },
447+ popEnterTransition = { screenScaleIn },
448+ popExitTransition = { screenSlideOut },
449+ ) {
433450 BackupSettingsScreen (navController)
434451 }
435452}
436453
437454private fun NavGraphBuilder.backupWalletSettings (
438455 navController : NavHostController ,
439456) {
440- composable<Routes .BackupWalletSettings > {
457+ composable<Routes .BackupWalletSettings >(
458+ enterTransition = { screenSlideIn },
459+ exitTransition = { screenScaleOut },
460+ popEnterTransition = { screenScaleIn },
461+ popExitTransition = { screenSlideOut },
462+ ) {
441463 BackupWalletScreen (navController)
442464 }
443465}
444466
445467private fun NavGraphBuilder.restoreWalletSettings (
446468 navController : NavHostController ,
447469) {
448- composable<Routes .RestoreWalletSettings > {
470+ composable<Routes .RestoreWalletSettings >(
471+ enterTransition = { screenSlideIn },
472+ exitTransition = { screenScaleOut },
473+ popEnterTransition = { screenScaleIn },
474+ popExitTransition = { screenSlideOut },
475+ ) {
449476 RestoreWalletScreen (navController)
450477 }
451478}
452479
453480private fun NavGraphBuilder.channelOrdersSettings (
454481 navController : NavHostController ,
455482) {
456- composable<Routes .ChannelOrdersSettings > {
483+ composable<Routes .ChannelOrdersSettings >(
484+ enterTransition = { screenSlideIn },
485+ exitTransition = { screenScaleOut },
486+ popEnterTransition = { screenScaleIn },
487+ popExitTransition = { screenSlideOut },
488+ ) {
457489 ChannelOrdersScreen (
458490 onBackClick = { navController.popBackStack() },
459491 onOrderItemClick = { navController.navigateToOrderDetail(it) },
@@ -465,7 +497,12 @@ private fun NavGraphBuilder.channelOrdersSettings(
465497private fun NavGraphBuilder.orderDetailSettings (
466498 navController : NavHostController ,
467499) {
468- composable<Routes .OrderDetail > { navBackEntry ->
500+ composable<Routes .OrderDetail >(
501+ enterTransition = { screenSlideIn },
502+ exitTransition = { screenScaleOut },
503+ popEnterTransition = { screenScaleIn },
504+ popExitTransition = { screenSlideOut },
505+ ) { navBackEntry ->
469506 OrderDetailScreen (
470507 orderItem = navBackEntry.toRoute(),
471508 onBackClick = { navController.popBackStack() },
@@ -476,7 +513,12 @@ private fun NavGraphBuilder.orderDetailSettings(
476513private fun NavGraphBuilder.cjitDetailSettings (
477514 navController : NavHostController ,
478515) {
479- composable<Routes .CjitDetail > { navBackEntry ->
516+ composable<Routes .CjitDetail >(
517+ enterTransition = { screenSlideIn },
518+ exitTransition = { screenScaleOut },
519+ popEnterTransition = { screenScaleIn },
520+ popExitTransition = { screenSlideOut },
521+ ) { navBackEntry ->
480522 CJitDetailScreen (
481523 cjitItem = navBackEntry.toRoute(),
482524 onBackClick = { navController.popBackStack() },
@@ -488,7 +530,12 @@ private fun NavGraphBuilder.lightning(
488530 viewModel : WalletViewModel ,
489531 navController : NavHostController ,
490532) {
491- composable<Routes .Lightning > {
533+ composable<Routes .Lightning >(
534+ enterTransition = { screenSlideIn },
535+ exitTransition = { screenScaleOut },
536+ popEnterTransition = { screenScaleIn },
537+ popExitTransition = { screenSlideOut },
538+ ) {
492539 LightningSettingsScreen (viewModel, navController)
493540 }
494541}
@@ -497,15 +544,25 @@ private fun NavGraphBuilder.devSettings(
497544 viewModel : WalletViewModel ,
498545 navController : NavHostController ,
499546) {
500- composable<Routes .DevSettings > {
547+ composable<Routes .DevSettings >(
548+ enterTransition = { screenSlideIn },
549+ exitTransition = { screenScaleOut },
550+ popEnterTransition = { screenScaleIn },
551+ popExitTransition = { screenSlideOut },
552+ ) {
501553 DevSettingsScreen (viewModel, navController)
502554 }
503555}
504556
505557private fun NavGraphBuilder.regtestSettings (
506558 navController : NavHostController ,
507559) {
508- composable<Routes .RegtestSettings > {
560+ composable<Routes .RegtestSettings >(
561+ enterTransition = { screenSlideIn },
562+ exitTransition = { screenScaleOut },
563+ popEnterTransition = { screenScaleIn },
564+ popExitTransition = { screenSlideOut },
565+ ) {
509566 val viewModel = hiltViewModel<BlocktankRegtestViewModel >()
510567 BlocktankRegtestScreen (viewModel, navController)
511568 }
0 commit comments