Releases: AdamKobus/compose-navigation
Releases · AdamKobus/compose-navigation
1.0.0
0.3.0
Changes
- Added
NavDestination.popUpTo
which is equivalent ofNavHostController.popBackStack(route, saveState, inclusive)
NavRoute
andNavRouteBuilder
no longer accept custom path separators. Separator is now hardcoded to '/'- Added
ComposeNavHost
. It is now a recommended way to declare NavHost - Introduced
NavigationId
which should be used to differentiate separate NavHostControllers / NavHosts. ComposeNavigation.getNavigationStateSource()
now requiresNavigationId
param- Tasks processing now has a configurable timeout. By default it's set to 1000ms.
You can change it to your own value viaComposeNavigation.setNavigationProcessingTimeout
- Improved stability of navigation processor initialization logic.
- Added
ComposeNavigation.setIoDispatcher
- Added support for nested Nav Hosts
- NavState now has a list of
NavControllerState
s which gives access to information about all used NavHosts NavIntent
has an additional field now which is callednavigationId
.
It's just for informational purpose and it doesn't influence the intents processing.- #96
NavStackEntry
is no longer nullable incomposableDestination
lambda - Improved error messages when reading NavStackEntry arguments
- Added support for Long, Float, Double and Boolean navigation arguments
- updated AGP to 7.2.2, updated other dependencies
0.2.0
Fixes
- #26
NavDestinationManager.currentDestination
change to the first visible
screen happens instantly on app launch now.
Changes
- Updated dependencies
NavActionVerifier
now returns VerifyResult enum instead of Boolean- Improved the current destination evaluation code
- Prepared the code for handling nested / multiple NavHosts
INavAction
name was changed toNavAction
and it now has 2 different implementations:NavigateAction
andPopAction
INavDestination
now has 4 different implementations:NavGraph
,ScreenDestination
,DialogDestination
andPopDestination
.
This makes it easy to determine which type of action should be performed and provides more info about back stack.NavActionWrapper
is now an abstract class so that there is less boilerplate code in NavActions declarations using sealed classes.NavGraph
is now an abstract class that requiresname
to be passed in constructorNavGraph
now has abstract methodstartDestination()
NavGraphBuilder.composableNavigation
no longer acceptsstartDestination
as a param.NavComposable
now acceptsvararg observedGraphs: NavGraph
. If any NavGraph is provided, then received actions will be filtered only to
those withfromDestination
belonging to provided graph(s)- Added
NavLogger
- Added
NavDestinationManager
- it provides information about current destination and back stack queue - Added
ComposeNavigation
which should be used to configure the library and get access to its state - Moved documentation to docs
- Names starting with double underscore (i.e.
__myGraph
) are now reserved for internal usage.
Trying to declare graph, path or param name like this will now result inReservedNameError
being thrown.
This behaviour can be disabled usingComposeNavigation.disableRestrictedNamesCheck()
NavActionConsumer
interface name was changed toNavigationConsumer
- Removed all
+
operators and changed the name ofto
infix function togoTo
andpop
.
Usingto
was annoying sometimes because Kotlin would try to interpret it as map in some circumstances. - Added
NavIntent
,NavIntentResolver
andResolveResult
ComposeNavigation
now hasaddNavIntentResolvers()
method which you can use to register your ownNavIntentResolver
s- Added
TabBarIntentResolver
- an implementation ofNavIntentResolver
which handles many edge cases related to tab bar navigation. NavAction
now hasasResult
method which producesResolveResult
- a class that indicates the processing result byNavIntentResolver
- All of the infix functions related to building
NavigateAction
andPopAction
were moved toNavDestination
class. - Removed dependency on Hilt.
ComposeNavigation
object is now responsible for providing all of the dependencies. - Added
NavOptionsBuilder.popUpTo
extensions - Updated Jetpack compose to
1.2.0-alpha03
- Updated Accompanist to
0.24.2-alpha
NavGraph
no longer hasnavDestination
method. From now on you should usescreenDestination
anddialogDestination
instead.- removed
com.adamkobus.compose.navigation.data
package. Classes were moved to.action
,.destination
and.intent
packages. CurrentDestination
class was replaced byNavState
. Also addedNavStackEntry
class which holds both destination and
the arguments with which it was launched.NavGraphBuilder.composableDestination
andNavGraphBuilder.composableDialog
content lambda
now acceptsNavStackEntry
instead ofNavBackStackEntry