Update composeDestinations to v2.1.0-beta11 #377
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
2.1.0-beta09
->2.1.0-beta11
2.1.0-beta09
->2.1.0-beta11
Release Notes
raamcosta/compose-destinations (io.github.raamcosta.compose-destinations:ksp)
v2.1.0-beta11
Compare Source
Changes
Full Changelog: raamcosta/compose-destinations@2.1.0-beta10...2.1.0-beta11
v2.1.0-beta10
Compare Source
Changes
startRoute
tostart
, for more, read below 👇2.8.0-beta05
)DestinationsNavHost start destination can now also have mandatory navigation arguments! 🙌
If you were passing a
startRoute
parameter when callingDestinationsNavHost
, you'll now need to update it to juststart
and the parameter type is now aDirection
(same type navigate method receives). So you can pass arguments here, like:Besides, in order for Compose Destinations to be sure you won't get a runtime exception, if your start route has mandatory arguments, then you'll need to either make them non mandatory (by adding defaults to them or making them null), or if you don't want to do that (let's say that Destination is also navigated to in a lot of other places, and the defaults in those cases are not ideal), you can:
These arguments will be automatically "sent" to
GreetingScreenDestination
(taking the above example) when the NavHost is first called!Result back feature now supports all types that normal navigation supports! 🚀
Previously, only these result types were allowed:
Now it allows all of these (same as normal navigation):
ResultBackNavigator
or aResultRecipient
you will need to update those calls to pass in aDestinationsNavType
corresponding to your result type.You can check the corresponding generated Destination and see how it calls your Composable, and do the same, or you can just start typing your result class type name (lower case) and IDE will help you.
For example, if your Destination receives a:
ResultBackNavigator<Boolean>
you'll want to pass inresultBackNavigator(booleanNavType)
(booleanNavType
is a top level field you can import from core library)ResultBackNavigator<MyParcelableClass>
you'll passresultBackNavigator(myParcelableClassNavType)
(myParcelableClassNavType
is a top level field you can import from generated code).If not calling it manually, then generated code will do this for you, so no need to change anything in that case.
New debug mode
This is mainly to help me understand users' setup when there's a reported issue so that I can find the root cause and fix it quicker.
New ksp configuration added:
When set, it will write some debug files to a folder on
$rootDir/composeDestinationsDebug
(taking above example).Please make sure to:
DO NOT leave the configuration ON as it may slow down builds for no reason, just remove it after sending me the files.
Full Changelog: raamcosta/compose-destinations@2.1.0-beta09...2.1.0-beta10
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.