Releases: raamcosta/compose-destinations
2.2.0
What changed
- Fixes issues related to KSP v2
- Fixes #736
- Fixes #728
- Fixes #714
- Fixes #719
- Improve error messages and docs
- Dependency updates
Optional result back in ON_RESUME / ON_START #719
By default, compose destinations will call onNavResult in first opportunity between "onResume" and "onStart". That is because in some situations, I've found that "onResume" is actually not called.
However, that makes it be called mostly in "onStart", and in some other cases it may not be ideal (see #719).
So, we've introduced a new onNavResult
overload that takes a parameter developers can use to choose when they want to receive the result. Example:
@Destination<RootGraph>
@Composable
fun MyScreen(
resultRecipient: ResultRecipient<ConfirmationScreenDestination, Boolean>
) {
resultRecipient.onNavResult(
deliverResultOn = OpenResultRecipient.DeliverResultOn.RESUME
) { result ->
// ...
}
}
By default, if you call the overload which does not take any param here, it will use FIRST_OPPORTUNITY
to not make a breaking change in behaviour here.
New Destination label (#714)
Destination
annotation now has a new param "label". This is used to set what official navigation library supports in NavDestination.label
. Can be useful for monitoring, logging, etc.
@Destination<RootGraph>(
label = "my screen label"
)
@Composable
fun MyScreen() {
}
Full Changelog: 2.1.1...2.2.0
2.1.0 - First non beta of v2!
What's Changed
- Adapt to KSP2 API changes by @FooIbar in #643
- Additional changes to work with KSP2
- Update dependencies
If you're using NavHostDefaultStartArgs
annotation
- Make sure to change the top level field with a top level function. There's an issue with resolving type arguments of annotations used in top level fields with KSP2.
New Contributors
Full Changelog: 2.1.0-beta16...2.1.0
2.1.0-beta16
1.11.9
2.1.0-beta15
1.11.8
2.1.0-beta14
Changes
- Fixes #678
- Improve error message when using ResultBackNavigator with unsupported type.
- Updated dependencies
Full Changelog: 2.1.0-beta13...2.1.0-beta14
2.0.0-beta12
Changes
- Fixes #678
- Improve error message when using ResultBackNavigator with unsupported type.
Full Changelog: 2.0.0-beta11...2.0.0-beta12
1.11.7
2.1.0-beta12
Changes
Full Changelog: 2.1.0-beta11...2.1.0-beta12