@momo-kits/native-kits 0.160.1-container.2-debug → 0.160.1-container.3-debug
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compose/build.gradle.kts +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +0 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +0 -2
- package/gradle/libs.versions.toml +1 -1
- package/gradle.properties +1 -1
- package/package.json +1 -1
package/compose/build.gradle.kts
CHANGED
|
@@ -3,9 +3,7 @@ package vn.momo.kits.navigation
|
|
|
3
3
|
import androidx.compose.animation.*
|
|
4
4
|
import androidx.compose.animation.core.tween
|
|
5
5
|
import androidx.compose.runtime.*
|
|
6
|
-
// AI-GENERATED START: import rememberSaveable for stable screen id across nav back-stack save/restore
|
|
7
6
|
import androidx.compose.runtime.saveable.rememberSaveable
|
|
8
|
-
// AI-GENERATED END: import rememberSaveable for stable screen id across nav back-stack save/restore
|
|
9
7
|
import androidx.compose.ui.unit.Dp
|
|
10
8
|
import androidx.navigation.compose.NavHost
|
|
11
9
|
import androidx.navigation.compose.composable
|
|
@@ -52,11 +50,9 @@ fun NavigationContainer(
|
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
|
|
55
|
-
// AI-GENERATED START: keep initial screen id stable with restored nav back stack and refresh its live content
|
|
56
53
|
val screenId = rememberSaveable { DynamicScreenRegistry.nextId() }
|
|
57
54
|
DynamicScreenRegistry.bind(screenId, initialScreenName, initialScreen, options)
|
|
58
55
|
val startDestination = remember(screenId) { DynamicScreenRoute(screenId) }
|
|
59
|
-
// AI-GENERATED END: keep initial screen id stable with restored nav back stack and refresh its live content
|
|
60
56
|
|
|
61
57
|
ProvideNavigationEventDispatcherOwner {
|
|
62
58
|
CompositionLocalProvider(
|
|
@@ -196,7 +196,6 @@ object DynamicScreenRegistry {
|
|
|
196
196
|
return DynamicScreenRoute(id)
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
// AI-GENERATED START: stable-id registration so a saveable screen id stays in sync with restored nav back stack
|
|
200
199
|
fun nextId(): Int = idCounter++
|
|
201
200
|
|
|
202
201
|
fun bind(id: Int, screenName: String, content: @Composable () -> Unit, options: NavigationOptions?) {
|
|
@@ -208,7 +207,6 @@ object DynamicScreenRegistry {
|
|
|
208
207
|
)
|
|
209
208
|
if (id >= idCounter) idCounter = id + 1 // keep counter ahead after process-death restore
|
|
210
209
|
}
|
|
211
|
-
// AI-GENERATED END: stable-id registration so a saveable screen id stays in sync with restored nav back stack
|
|
212
210
|
|
|
213
211
|
fun unregisterScreen(id: Int) {
|
|
214
212
|
screens.remove(id)
|
package/gradle.properties
CHANGED
|
@@ -18,7 +18,7 @@ kotlin.apple.xcodeCompatibility.nowarn=true
|
|
|
18
18
|
name="ComposeKits"
|
|
19
19
|
group=vn.momo.kits
|
|
20
20
|
artifact.id=kits
|
|
21
|
-
version=0.160.1-container.
|
|
21
|
+
version=0.160.1-container.3
|
|
22
22
|
|
|
23
23
|
repo=GitLab
|
|
24
24
|
url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
|