From 4ebceac07f83270df81daff99c2f0d360cca37ef Mon Sep 17 00:00:00 2001 From: Ivan Iskandar <12537387+ivaniskandar@users.noreply.github.com> Date: Sun, 14 Aug 2022 01:27:07 +0700 Subject: [PATCH] UpdatesScreen: Fix inset related issue (#7741) --- .../eu/kanade/presentation/updates/UpdatesScreen.kt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/updates/UpdatesScreen.kt b/app/src/main/java/eu/kanade/presentation/updates/UpdatesScreen.kt index 0ac33f6058..5abdb9cd82 100644 --- a/app/src/main/java/eu/kanade/presentation/updates/UpdatesScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/updates/UpdatesScreen.kt @@ -68,7 +68,7 @@ fun UpdateScreen( ) { val updatesListState = rememberLazyListState() val insetPaddingValue = WindowInsets.navigationBars - .only(WindowInsetsSides.Horizontal + WindowInsetsSides.Bottom) + .only(WindowInsetsSides.Horizontal) .asPaddingValues() val internalOnBackPressed = { @@ -119,8 +119,12 @@ fun UpdateScreen( }, ) { contentPadding -> // During selection mode bottom nav is not visible - val contentPaddingWithNavBar = (if (presenter.selectionMode) PaddingValues() else bottomNavPaddingValues) + - contentPadding + WindowInsets.navigationBars.only(WindowInsetsSides.Bottom).asPaddingValues() + val contentPaddingWithNavBar = contentPadding + + if (presenter.selectionMode) { + PaddingValues() + } else { + bottomNavPaddingValues + WindowInsets.navigationBars.only(WindowInsetsSides.Bottom).asPaddingValues() + } val scope = rememberCoroutineScope() var isRefreshing by remember { mutableStateOf(false) } @@ -151,7 +155,6 @@ fun UpdateScreen( VerticalFastScroller( listState = updatesListState, topContentPadding = contentPaddingWithNavBar.calculateTopPadding(), - bottomContentPadding = contentPaddingWithNavBar.calculateBottomPadding(), endContentPadding = contentPaddingWithNavBar.calculateEndPadding(LocalLayoutDirection.current), ) { LazyColumn(