Skip to content

Releases: freeletics/khonshu

0.29.1

11 Nov 16:36
3e28f01
Compare
Choose a tag to compare

Navigation

  • Fixed TestHostNavigator.navigate {} failing when the method is called
    from a suspending function (both directly and indirectly).
  • Fixed ActivityResultRequest<*, O>.sendResult test helper requiring
    an @OptIn annotation.

0.29.0

08 Nov 13:56
0.29.0
c2f725e
Compare
Choose a tag to compare

Navigation

  • Replaced navigateToRoot and resetToRoot with switchBackStack and showRoot
    which have more predictable behavior and won't throw exceptions when called
    in certain back stack states.
  • Renamed replaceAll to replaceAllBackStacks.
  • 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

05 Aug 11:26
66f8e80
Compare
Choose a tag to compare

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

22 Jul 21:33
0.28.2
2905bf0
Compare
Choose a tag to compare

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

19 Jul 07:31
b88d2d6
Compare
Choose a tag to compare

Navigation

  • Fix race condition that would cause custom back handling to sometimes not work.

0.28.0

17 Jul 15:50
0130daf
Compare
Choose a tag to compare

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

21 Jun 08:15
6f0e7f9
Compare
Choose a tag to compare
  • ActivityRoute.buildIntent() has been changed to
    ActivityRoute.buildIntent(context: Context) to make using it easier.

0.27.0

20 Jun 17:11
58bd380
Compare
Choose a tag to compare

The documentation has been updated.

Navigation

  • Renamed ActivityResultNavigator base class to ActivityNavigator and moved
    navigateTo(ActivityRoute) to it. With this change the limitation that any
    Intent needs to use FLAG_ACTIVITY_NEW_TASK is removed.
  • Removed ActivityDestination. Instead ActivityRoute implementations now
    are building the full Intent. For InternalActivityRoute the route is still
    Intent automatically added to the Intent and the Intent is automatically
    limited to the current package to prevent hijacking of actions.
  • Removed the ability to add ActivityRoute to a DeepLink. The same can be achieved
    by just launching 2 intents or using TaskStackBuilder.

0.26.0

12 Jun 11:57
09fdf53
Compare
Choose a tag to compare

Navigation

  • Introduces HostNavigator. This was previously an internal type used within
    NavHost to execute navigation events. It's now possible to create a
    HostNavigator with rememberHostNavigator(...), pass that instance to NavHost
    and use it to navigate directly without the use of navigation events. It is safe
    to reference HostNavigator outside the UI layer.
  • DestinationNavigator is a replacement for NavEventNavigator that delegates
    to HostNavigator, which means it also works without navigation events. The
    advantage of using this over using HostNavigator directly is that
    DestinationNavigator supports activity results, which HostNavigator doesn't.
  • The navigate {} function that allows grouping multiple navigation events
    is now more efficient. The NavHost 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 the NavHostActivity component.
  • It's required that a NavRoot is provided into the scope of a NavHostActivity.
  • Each NavDestination now requires an ActivityResultNavigator to be provided into
    the scope (previously NavEventNavigator was required).

0.25.1

28 May 07:23
2319502
Compare
Choose a tag to compare
Version 0.25.1