Skip to content

Commit

Permalink
Prepare for release 0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
xxfast committed Sep 22, 2023
1 parent cbaad13 commit 09a7fc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

[![Kotlin Experimental](https://kotl.in/badges/experimental.svg)](https://kotlinlang.org/docs/components-stability.html)
[![Build](https://github.com/xxfast/Decompose-Router/actions/workflows/build.yml/badge.svg)](https://github.com/xxfast/Decompose-Router/actions/workflows/build.yml)
[![Kotlin](https://img.shields.io/badge/Kotlin-1.9.0-blue.svg?style=flat&logo=kotlin)](https://kotlinlang.org)
[![Kotlin](https://img.shields.io/badge/Kotlin-1.9.10-blue.svg?style=flat&logo=kotlin)](https://kotlinlang.org)
[![Maven Central](https://img.shields.io/maven-central/v/io.github.xxfast/decompose-router?color=blue)](https://search.maven.org/search?q=g:io.github.xxfast)

![badge-android](http://img.shields.io/badge/platform-android-6EDB8D.svg?style=flat)
Expand Down Expand Up @@ -131,7 +131,7 @@ sealed class Screen: Parcelable {
@Composable
fun ListDetailScreen() {
// Create a router with a stack of screen configurations 🚏
val router: Router<Screen> = rememberRouter(listOf(List))
val router: Router<Screen> = rememberRouter { listOf(List) }

// Hoist your screens for each configuration 🏗️
RoutedContent(router = router) { screen ->
Expand Down Expand Up @@ -176,9 +176,9 @@ class DetailInstance(savedState: SavedStateHandle, detail: String) : InstanceKee
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val rootComponentContext: DefaultComponentContext = defaultComponentContext()
val rootRouterContext: RouterContext = defaultRouterContext()
setContent {
CompositionLocalProvider(LocalComponentContext provides rootComponentContext) {
CompositionLocalProvider(LocalRouterContext provides rootRouterContext) {
MaterialTheme {
ListDetailScreen()
}
Expand All @@ -196,11 +196,11 @@ class DetailInstance(savedState: SavedStateHandle, detail: String) : InstanceKee
```kotlin
fun main() {
val lifecycle = LifecycleRegistry()
val rootComponentContext = DefaultComponentContext(lifecycle = lifecycle)
val rootRouterContext = RouterContext(lifecycle = lifecycle)

application {
Window {
CompositionLocalProvider(LocalComponentContext provides rootComponentContext) {
CompositionLocalProvider(LocalRouterContext provides rootRouterContext) {
MaterialTheme {
ListDetailScreen()
}
Expand All @@ -218,8 +218,8 @@ class DetailInstance(savedState: SavedStateHandle, detail: String) : InstanceKee
```kotlin
fun main(): UIViewController = ComposeUIViewController {
val lifecycle = LifecycleRegistry()
val rootComponentContext = DefaultComponentContext(lifecycle = lifecycle)
CompositionLocalProvider(LocalComponentContext provides rootComponentContext) {
val rootRouterContext = RouterContext(lifecycle = lifecycle)
CompositionLocalProvider(LocalRouterContext provides rootRouterContext) {
MaterialTheme {
ListDetailScreen()
}
Expand All @@ -237,7 +237,7 @@ class DetailInstance(savedState: SavedStateHandle, detail: String) : InstanceKee
fun main() {
onWasmReady {
val lifecycle = LifecycleRegistry()
val rootComponentContext = DefaultComponentContext(lifecycle = lifecycle)
val rootRouterContext = RouterContext(lifecycle = lifecycle)

BrowserViewportWindow(..) {
CompositionLocalProvider(LocalComponentContext provides rootComponentContext) {
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ allprojects {
}

group = "io.github.xxfast"
version = "0.5.0-SNAPSHOT"
version = "0.5.0"

apply(plugin = "org.jetbrains.dokka")
apply(plugin = "maven-publish")
Expand Down

0 comments on commit 09a7fc7

Please sign in to comment.