Skip to content

Commit

Permalink
docs: add change log for v0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hoc081098 committed Aug 17, 2024
1 parent e9c836d commit 808dd19
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 3 deletions.
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,46 @@

- TDB

## [0.5.0] - Jul 22, 2024

### Update dependencies

- [KotlinX Coroutines `1.9.0-RC.2`](https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.9.0-RC.2).
- [AndroidX Lifecycle `2.8.4`](https://developer.android.com/jetpack/androidx/releases/lifecycle#2.8.4).
- [AndroidX Compose Activity `1.9.1`](https://developer.android.com/jetpack/androidx/releases/activity#1.9.1).
- [AndroidX Annotation `1.8.2`](https://developer.android.com/jetpack/androidx/releases/annotation#1.8.2).

### 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`.
```kotlin
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] - Jul 22, 2024

### Update dependencies
Expand Down Expand Up @@ -75,6 +115,7 @@
### Example, docs and tests

-

Add [Compose Multiplatform Todo solivagant Sample](https://github.com/hoc081098/Compose-Multiplatform-Todo-solivagant-Sample):
A KMP template of the Todo App using Compose multiplatform for Android, Desktop, iOS and Web.
Share everything including data, domain, presentation, and UI.
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# solivagant 🔆

## 🔆 Compose Multiplatform Navigation library - 🌸 Pragmatic, type safety navigation for Compose Multiplatform. Based on [Freeletics Khonshu Navigation](https://freeletics.github.io/khonshu/navigation/get-started/). ♥️ ViewModel, SavedStateHandle, Lifecycle, Multi-Backstacks, Transitions, Back-press handling, and more...
## [🟢 ACTIVE] 🔆 Compose Multiplatform Navigation library - 🌸 Pragmatic, type safety navigation for Compose Multiplatform. Based on [Freeletics Khonshu Navigation](https://freeletics.github.io/khonshu/navigation/get-started/). ♥️ ViewModel, SavedStateHandle, Lifecycle, Multi-Backstacks, Transitions, Back-press handling, and more...

[![maven-central](https://img.shields.io/maven-central/v/io.github.hoc081098/solivagant-navigation)](https://search.maven.org/search?q=g:io.github.hoc081098%20solivagant-navigation)
[<img src="https://img.shields.io/nexus/snapshots/https/s01.oss.sonatype.org/io.github.hoc081098/solivagant-navigation.svg?label=latest%20snapshot"/>](https://s01.oss.sonatype.org/content/repositories/snapshots/io/github/hoc081098/solivagant-navigation)
Expand Down Expand Up @@ -426,6 +426,10 @@ navigator.navigateBackTo<MainScreenRoute>(inclusive = false)
- [x] Support transition when navigating (since [0.1.0](https://github.com/hoc081098/solivagant/releases/tag/0.1.0)).
- [x] Support more targets such as wasm, watchOS, tvOS, etc... (since [0.2.0](https://github.com/hoc081098/solivagant/releases/tag/0.2.0)).
## 🟢 Active status
This library is actively maintained and updated with new features and bug fixes.
## License
```license
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@ private fun LifecycleStartEffectImpl(
effectResult = effects()
}

Lifecycle.Event.ON_STOP -> effectResult?.runStopOrDisposeEffect()
Lifecycle.Event.ON_STOP -> {
effectResult?.runStopOrDisposeEffect()
effectResult = null
}

else -> {}
}
Expand Down Expand Up @@ -655,7 +658,10 @@ private fun LifecycleResumeEffectImpl(
effectResult = effects()
}

Lifecycle.Event.ON_PAUSE -> effectResult?.runPauseOrOnDisposeEffect()
Lifecycle.Event.ON_PAUSE -> {
effectResult?.runPauseOrOnDisposeEffect()
effectResult = null
}

else -> {}
}
Expand Down

0 comments on commit 808dd19

Please sign in to comment.