Releases: freeletics/khonshu
Releases · freeletics/khonshu
0.29.1
0.29.0
Navigation
- Replaced
navigateToRoot
andresetToRoot
withswitchBackStack
andshowRoot
which have more predictable behavior and won't throw exceptions when called
in certain back stack states. - Renamed
replaceAll
toreplaceAllBackStacks
. - Fixed an issue that would cause delayed state updates after a predictive back
gesture. These delayed state updates could cause the app to be unresponsive for
a moment or that the same back navigation was repeated. - Removed the deprecated
NavEventNavigator
.
Codegen
- Remove support for running as an Anvil plugin. Khoshu's codegen now always needs to be
used through KSP.
State Machine
- Added Wasm/WASI target.
0.28.3
Codegen
- Fix crash when
StackSnapshot.entryFor
is called for the start destination while being
on a different back stack. - Fix KSP2 support for version 2.0.0-1.0.23 and newer.
0.28.2
Navigation
- Avoid composable of previous being re-created at the end of the predictive back
animation. This was causing a visible blinking in the UI. - Fix part of the predictive back animation being run when using 3 button navigation.
0.28.1
Navigation
- Fix race condition that would cause custom back handling to sometimes not work.
0.28.0
Navigation
- Implement predictive back support. When predictive back is enabled by setting
android:enableOnBackInvokedCallback="true"
in the AndroidManifest, Khonshu
will automatically handle back presses with the predictive back animation
to the previous destination.
Codegen
- Support for KSP2.
0.27.1
ActivityRoute.buildIntent()
has been changed to
ActivityRoute.buildIntent(context: Context)
to make using it easier.
0.27.0
The documentation has been updated.
Navigation
- Renamed
ActivityResultNavigator
base class toActivityNavigator
and moved
navigateTo(ActivityRoute)
to it. With this change the limitation that any
Intent
needs to useFLAG_ACTIVITY_NEW_TASK
is removed. - Removed
ActivityDestination
. InsteadActivityRoute
implementations now
are building the fullIntent
. ForInternalActivityRoute
the route is still
Intent
automatically added to theIntent
and theIntent
is automatically
limited to the current package to prevent hijacking of actions. - Removed the ability to add
ActivityRoute
to aDeepLink
. The same can be achieved
by just launching 2 intents or usingTaskStackBuilder
.
0.26.0
Navigation
- Introduces
HostNavigator
. This was previously an internal type used within
NavHost
to execute navigation events. It's now possible to create a
HostNavigator
withrememberHostNavigator(...)
, pass that instance toNavHost
and use it to navigate directly without the use of navigation events. It is safe
to referenceHostNavigator
outside the UI layer. DestinationNavigator
is a replacement forNavEventNavigator
that delegates
toHostNavigator
, which means it also works without navigation events. The
advantage of using this over usingHostNavigator
directly is that
DestinationNavigator
supports activity results, whichHostNavigator
doesn't.- The
navigate {}
function that allows grouping multiple navigation events
is now more efficient. TheNavHost
will only be updated once at the end and
not between the actions of such a group. NavEventNavigator
will be removed in one of the next releases.
Codegen
- A
HostNavigator
is automatically created in theNavHostActivity
component. - It's required that a
NavRoot
is provided into the scope of aNavHostActivity
. - Each
NavDestination
now requires anActivityResultNavigator
to be provided into
the scope (previouslyNavEventNavigator
was required).
0.25.1
Version 0.25.1