diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 21ff9b1..18fd724 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,7 +12,7 @@ androidGradlePlugin = "8.6.1" junit = "4.13.2" junitJupiterEngine = "5.11.0" junitJupiterApi = "5.11.0" -kotlin = "2.0.0" +kotlin = "2.0.20" lifecycleRuntimeKtx = "2.8.6" material = "1.7.2" kotlinxCoroutinesCore = "1.9.0" diff --git a/precompose-molecule/src/commonMain/kotlin/moe/tlaster/precompose/molecule/Molecule.kt b/precompose-molecule/src/commonMain/kotlin/moe/tlaster/precompose/molecule/Molecule.kt index fc3e849..99835c8 100644 --- a/precompose-molecule/src/commonMain/kotlin/moe/tlaster/precompose/molecule/Molecule.kt +++ b/precompose-molecule/src/commonMain/kotlin/moe/tlaster/precompose/molecule/Molecule.kt @@ -52,7 +52,9 @@ private class ActionViewHolder : ViewModel() { private fun rememberAction( key: String? = null, ): Pair, Flow> { - return viewModel>(key = key).pair + return viewModel>(key = key) { + ActionViewHolder() + }.pair } /** diff --git a/precompose/src/commonMain/kotlin/moe/tlaster/precompose/navigation/Navigator.kt b/precompose/src/commonMain/kotlin/moe/tlaster/precompose/navigation/Navigator.kt index 584bec8..4a4b6e2 100644 --- a/precompose/src/commonMain/kotlin/moe/tlaster/precompose/navigation/Navigator.kt +++ b/precompose/src/commonMain/kotlin/moe/tlaster/precompose/navigation/Navigator.kt @@ -14,7 +14,9 @@ import kotlinx.coroutines.flow.map */ @Composable fun rememberNavigator(key: String? = null): Navigator { - val viewModel = viewModel(key = key) + val viewModel = viewModel(key = key) { + NavigatorViewModel() + } return viewModel.navigator }