@momo-kits/native-kits 0.167.1-duo.6-debug → 0.167.1-duo.7-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
|
@@ -302,11 +302,12 @@ internal fun ColumnScope.MainContent(content: @Composable () -> Unit, isBottomTa
|
|
|
302
302
|
Spacer(Modifier.height((HEADER_HEIGHT.dp - scrollDp).coerceIn(0.dp, HEADER_HEIGHT.dp)))
|
|
303
303
|
}
|
|
304
304
|
// a bottom tab root stays full width: the tab bar and each tab's own StackScreen handle the insets
|
|
305
|
+
val insetContent = !isBottomTabRoot
|
|
305
306
|
Column(
|
|
306
307
|
Modifier
|
|
307
308
|
.fillMaxWidth()
|
|
308
309
|
.weight(1f)
|
|
309
|
-
.conditional(!
|
|
310
|
+
.conditional(insetContent && options.headerType !is HeaderType.Animated) {
|
|
310
311
|
horizontalSafeAreaPadding()
|
|
311
312
|
}
|
|
312
313
|
.conditional(options.scrollData.scrollable && options.scrollData.scrollState is ScrollState) {
|
|
@@ -324,19 +325,22 @@ internal fun ColumnScope.MainContent(content: @Composable () -> Unit, isBottomTa
|
|
|
324
325
|
}
|
|
325
326
|
)
|
|
326
327
|
) {
|
|
327
|
-
|
|
328
|
-
LocalScreenLayout provides if (isBottomTabRoot) screenLayout else screenLayout.consumeHorizontalInsets()
|
|
329
|
-
) {
|
|
330
|
-
ScreenContent(content = content)
|
|
331
|
-
}
|
|
328
|
+
ScreenContent(content = content, insetContent = insetContent)
|
|
332
329
|
}
|
|
333
330
|
|
|
334
331
|
}
|
|
335
332
|
|
|
336
333
|
@Composable
|
|
337
|
-
internal fun ScreenContent(content: @Composable () -> Unit) {
|
|
334
|
+
internal fun ScreenContent(content: @Composable () -> Unit, insetContent: Boolean) {
|
|
338
335
|
val scrollState = LocalScrollState.current
|
|
339
336
|
val options = LocalOptions.current
|
|
337
|
+
val screenLayout = getScreenLayout()
|
|
338
|
+
val insetBody: @Composable () -> Unit = {
|
|
339
|
+
CompositionLocalProvider(
|
|
340
|
+
LocalScreenLayout provides if (insetContent) screenLayout.consumeHorizontalInsets() else screenLayout,
|
|
341
|
+
content = content,
|
|
342
|
+
)
|
|
343
|
+
}
|
|
340
344
|
|
|
341
345
|
if (options.headerType is HeaderType.Animated) {
|
|
342
346
|
val animatedHeader = options.headerType
|
|
@@ -347,12 +351,16 @@ internal fun ScreenContent(content: @Composable () -> Unit) {
|
|
|
347
351
|
Box(bannerModifier) {
|
|
348
352
|
animatedHeader.composable.invoke(scrollState.value)
|
|
349
353
|
}
|
|
350
|
-
Box(
|
|
351
|
-
|
|
354
|
+
Box(
|
|
355
|
+
Modifier
|
|
356
|
+
.padding(top = screenLayout.headerHeight + animatedHeader.layoutOffSet)
|
|
357
|
+
.conditional(insetContent) { horizontalSafeAreaPadding() }
|
|
358
|
+
) {
|
|
359
|
+
insetBody()
|
|
352
360
|
}
|
|
353
361
|
}
|
|
354
362
|
} else {
|
|
355
|
-
|
|
363
|
+
insetBody()
|
|
356
364
|
}
|
|
357
365
|
}
|
|
358
366
|
|