@momo-kits/native-kits 0.161.2-beta.4-debug → 0.161.2-beta.5-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
CHANGED
|
@@ -54,9 +54,6 @@ fun NavigationContainer(
|
|
|
54
54
|
DynamicScreenRegistry.bind(screenId, initialScreenName, initialScreen, options)
|
|
55
55
|
val startDestination = remember(screenId) { DynamicScreenRoute(screenId) }
|
|
56
56
|
|
|
57
|
-
val optionsState = remember { mutableStateOf(options) }
|
|
58
|
-
SideEffect { optionsState.value = options }
|
|
59
|
-
|
|
60
57
|
ProvideNavigationEventDispatcherOwner {
|
|
61
58
|
CompositionLocalProvider(
|
|
62
59
|
LocalNavigator provides navigator,
|
|
@@ -98,8 +95,7 @@ fun NavigationContainer(
|
|
|
98
95
|
id = route.id,
|
|
99
96
|
name = screen.name,
|
|
100
97
|
content = screen.content,
|
|
101
|
-
navigationOptions = screen.options
|
|
102
|
-
containerOptions = if (route.id == screenId) optionsState else null
|
|
98
|
+
navigationOptions = screen.options
|
|
103
99
|
)
|
|
104
100
|
}
|
|
105
101
|
}
|
|
@@ -85,7 +85,6 @@ internal fun StackScreen(
|
|
|
85
85
|
name: String = "",
|
|
86
86
|
bottomTabIndex: Int = -1,
|
|
87
87
|
onBackHandler: (() -> Unit)? = null,
|
|
88
|
-
containerOptions: State<NavigationOptions?>? = null,
|
|
89
88
|
) {
|
|
90
89
|
val navigator = LocalNavigator.current
|
|
91
90
|
val maxApi = LocalMaxApi.current
|
|
@@ -94,15 +93,6 @@ internal fun StackScreen(
|
|
|
94
93
|
val density = LocalDensity.current
|
|
95
94
|
val navigation = remember { Navigation(id = id, bottomTabIndex = bottomTabIndex, initOptions = navigationOptions) }
|
|
96
95
|
|
|
97
|
-
val latestContainerOptions = containerOptions?.value
|
|
98
|
-
LaunchedEffect(latestContainerOptions) {
|
|
99
|
-
latestContainerOptions?.let { newOptions ->
|
|
100
|
-
if (newOptions != navigation.options) {
|
|
101
|
-
navigation.setOptions(newOptions)
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
96
|
val options by navigation.currentOptions
|
|
107
97
|
|
|
108
98
|
// Auto tracking state
|
|
@@ -284,7 +274,7 @@ fun ScreenContent(content: @Composable () -> Unit) {
|
|
|
284
274
|
Box(Modifier.fillMaxWidth().aspectRatio(animatedHeader.aspectRatio.value)) {
|
|
285
275
|
animatedHeader.composable.invoke(scrollState.value)
|
|
286
276
|
}
|
|
287
|
-
Box(Modifier.
|
|
277
|
+
Box(Modifier.padding(top = AppStatusBar.current + HEADER_HEIGHT.dp + animatedHeader.layoutOffSet)) {
|
|
288
278
|
content()
|
|
289
279
|
}
|
|
290
280
|
}
|
package/gradle.properties
CHANGED