UpdatesScreen: Fix inset related issue (#7741)
This commit is contained in:
parent
aab5a56892
commit
4ebceac07f
1 changed files with 7 additions and 4 deletions
|
@ -68,7 +68,7 @@ fun UpdateScreen(
|
||||||
) {
|
) {
|
||||||
val updatesListState = rememberLazyListState()
|
val updatesListState = rememberLazyListState()
|
||||||
val insetPaddingValue = WindowInsets.navigationBars
|
val insetPaddingValue = WindowInsets.navigationBars
|
||||||
.only(WindowInsetsSides.Horizontal + WindowInsetsSides.Bottom)
|
.only(WindowInsetsSides.Horizontal)
|
||||||
.asPaddingValues()
|
.asPaddingValues()
|
||||||
|
|
||||||
val internalOnBackPressed = {
|
val internalOnBackPressed = {
|
||||||
|
@ -119,8 +119,12 @@ fun UpdateScreen(
|
||||||
},
|
},
|
||||||
) { contentPadding ->
|
) { contentPadding ->
|
||||||
// During selection mode bottom nav is not visible
|
// During selection mode bottom nav is not visible
|
||||||
val contentPaddingWithNavBar = (if (presenter.selectionMode) PaddingValues() else bottomNavPaddingValues) +
|
val contentPaddingWithNavBar = contentPadding +
|
||||||
contentPadding + WindowInsets.navigationBars.only(WindowInsetsSides.Bottom).asPaddingValues()
|
if (presenter.selectionMode) {
|
||||||
|
PaddingValues()
|
||||||
|
} else {
|
||||||
|
bottomNavPaddingValues + WindowInsets.navigationBars.only(WindowInsetsSides.Bottom).asPaddingValues()
|
||||||
|
}
|
||||||
|
|
||||||
val scope = rememberCoroutineScope()
|
val scope = rememberCoroutineScope()
|
||||||
var isRefreshing by remember { mutableStateOf(false) }
|
var isRefreshing by remember { mutableStateOf(false) }
|
||||||
|
@ -151,7 +155,6 @@ fun UpdateScreen(
|
||||||
VerticalFastScroller(
|
VerticalFastScroller(
|
||||||
listState = updatesListState,
|
listState = updatesListState,
|
||||||
topContentPadding = contentPaddingWithNavBar.calculateTopPadding(),
|
topContentPadding = contentPaddingWithNavBar.calculateTopPadding(),
|
||||||
bottomContentPadding = contentPaddingWithNavBar.calculateBottomPadding(),
|
|
||||||
endContentPadding = contentPaddingWithNavBar.calculateEndPadding(LocalLayoutDirection.current),
|
endContentPadding = contentPaddingWithNavBar.calculateEndPadding(LocalLayoutDirection.current),
|
||||||
) {
|
) {
|
||||||
LazyColumn(
|
LazyColumn(
|
||||||
|
|
Reference in a new issue