Skip to content

Releases: hoc081098/solivagant

0.5.0

17 Aug 16:54
Compare
Choose a tag to compare

Update dependencies

Added

  • StackValidationMode: Introduced a new sealed interface StackValidationMode to handle
    different stack validation modes in the navigation stack. This interface includes three
    implementations:

    • Strict: Ensures the stack is always in a valid state and throws an exception if it transitions
      to an invalid state.
    • Lenient: Ensures the stack is always in a valid state but takes no action if it transitions to
      an invalid state.
    • Warning: Ensures the stack is always in a valid state and logs a warning if it transitions to
      an invalid state.
  • NavHost: Added a new parameter stackValidationMode: StackValidationMode to the NavHost
    composable.
    Default value is StackValidationMode.Lenient.

    NavHost(
      startRoute = LoginScreenRoute,
      destinations = AllDestinations,
      navEventNavigator = navigator,
      destinationChangedCallback = { currentRoute = it },
      stackValidationMode = StackValidationMode.Warning.Debug, // <--- Set the stack validation mode
    )

Fixed

  • Lifecycle*Effect completion is now idempotent (i.e., if the onStopOrDispose was called because
    of the Lifecycle being stopped, it won’t be called a second time upon disposal unless the
    Lifecycle goes back up to STARTED again).

0.4.0

22 Jul 14:09
Compare
Choose a tag to compare

0.3.0

13 Mar 14:41
Compare
Choose a tag to compare
  • Fix an issue where a wrong host LifecycleOwner can be used (#62).
  • Rework internal implementation and refactor code (#62).
  • Handle startRoute changes properly (#62).

0.2.2

09 Mar 10:13
Compare
Choose a tag to compare

Fixed

  • NavHost: handle the host LifecycleOwner properly to avoid memory leaks (#61).

0.2.1

08 Mar 17:50
Compare
Choose a tag to compare

Fixed

  • Fix an issue where SaveableStateHolder would not be properly cleared when the destination
    is removed from the back stack after configuration changes on Android (#59).

0.2.0

07 Mar 16:21
Compare
Choose a tag to compare

Update dependencies

Added

  • New: Add support for Kotlin/Wasm (wasmJs target) 🎉.
  • New: Add LenientLifecycleRegistry, a LifecycleRegistry without the state checking,
    and has moveTo method to move to a specific state. This is a flexible version of LifecycleRegistry.
  • New: Add rememberWindowLifecycleOwner() for Desktop (JVM) platform.
  • New: Add SavedStateSupport.ProvideCompositionLocals and SavedStateSupport.ClearOnDispose for non-Android platforms.

Fixed

  • Fixed: an issue where LocalLifecycleOwner provided the wrong LifecycleOwner to the content of NavHost composable.

Sample

  • New: Add Solivagant Wasm Sample.
    You can open the web application by running the ./gradlew :samples:solivagant-wasm-sample:wasmJsBrowserDevelopmentRun Gradle task.

0.1.1

25 Feb 10:32
Compare
Choose a tag to compare

Fixed

Example, docs and tests

0.1.0

19 Feb 07:46
Compare
Choose a tag to compare

Update dependencies

Added

  • New: Add optional transitionAnimations parameter to NavHost @composable functions.
    Animations can be overridden with NavHostDefaults.transitionAnimations
    or disabled with NavHostTransitionAnimations.noAnimations.
    Default animations are the same as default animations in AndroidX's NavHost.

Changed

  • Breaking: Add a Modifier parameter to content of NavDestination:

    @InternalNavigationApi
    public sealed interface ContentDestination<T : BaseRoute> : NavDestination {
      // other members...
      public val content: @Composable (route: T, modifier: Modifier) -> Unit
    }

    This change effects ScreenDestination and OverlayDestination as well.
    The modifier parameter should be passed to the content of NavDestination
    (a.k.a the root @Composable of the destination), for example:

    @Immutable
    @Parcelize
    data class DetailScreenRoute(val id: String) : NavRoute
    
    @JvmField
    val DetailScreenDestination = ScreenDestination<DetailScreenRoute> { route, modifier ->
      DetailScreen(modifier = modifier, route = route)
    }
    
    @Composable
    internal fun DetailScreen(modifier: Modifier, route: DetailScreenRoute) {
      Scaffold(
        modifier = modifier, // <--- Pass the modifier to the root @Composable
        topBar = { /* ... */ },
      ) {
        //* ... */
      }
    }

0.0.1

07 Feb 11:52
Compare
Choose a tag to compare