Skip to content

Commit 5e1e509

Browse files
committed
use padding instead of windowInsetsPadding
1 parent 2705729 commit 5e1e509

File tree

1 file changed

+6
-6
lines changed
  • Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/home

1 file changed

+6
-6
lines changed

Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/home/Home.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -430,13 +430,13 @@ private fun HomeScreen(
430430
library = library,
431431
/**
432432
* Edge-to-edge:
433-
* Handles left, right and top insets allowing content to scroll behind the system navigation bar for an edge-to-edge look.
433+
* Handles start, end and top insets allowing content to scroll behind the system navigation bar for an edge-to-edge look.
434434
* Bottom insets are applied to the last list item in [HomeContentGrid].
435435
*/
436-
modifier = modifier.windowInsetsPadding(
437-
WindowInsets(
438-
left = contentPadding.calculateLeftPadding(layoutDirection),
439-
right = contentPadding.calculateRightPadding(layoutDirection),
436+
modifier = modifier.padding(
437+
PaddingValues(
438+
start = contentPadding.calculateLeftPadding(layoutDirection),
439+
end = contentPadding.calculateRightPadding(layoutDirection),
440440
top = contentPadding.calculateTopPadding(),
441441
bottom = 0.dp,
442442
)
@@ -602,7 +602,7 @@ private fun HomeContentGrid(
602602
/**
603603
* Edge-to-edge:
604604
* Allows content to scroll behind the system navigation bar while ensuring the last list item is still accessible.
605-
* Top, right and left insets are handled in [HomeScreen].
605+
* Top, start and end insets are handled in [HomeScreen].
606606
*/
607607
contentPadding = WindowInsets.navigationBars.asPaddingValues()
608608
) {

0 commit comments

Comments
 (0)