Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: NavDestination.hasRoute<T>(), NavHostController.popBackStack<T> and remove createRoutePattern #143

Open
sonatard opened this issue Sep 15, 2024 · 0 comments

Comments

@sonatard
Copy link

This is not a request for navigation-compose-types to support navigation-compose:2.8.0. Rather, it’s the opposite—having the API in place before supporting navigation-compose:2.8.0 would make transitioning between navigation-compose:2.8.0 and navigation-compose-types easier.

I have tested navigation-compose:2.8.0, but I found some inconveniences, so I plan to return to navigation-compose-types.

- if (currentDestination?.destination?.hierarchy?.any { it.hasRoute<NavItem.A>() } == true) {
+ if (currentDestination?.destination?.hierarchy?.any { it.route == createRoutePattern<NavItem.A>() } == true) {
-  navController.popBackStack<NavItem.ProductRaffle>(
+ navController.popBackStack(
+    route = createRoutePattern<NavItem.ProductRaffle>(),
-        startDestination = NavItem.Start,
+        startDestination = createRoutePattern<NavItem.Start>(),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant