diff --git a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/HomeView.kt b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/HomeView.kt index 50cfc00a78..f5a2400f2f 100644 --- a/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/HomeView.kt +++ b/features/home/impl/src/main/kotlin/io/element/android/features/home/impl/HomeView.kt @@ -14,12 +14,15 @@ import androidx.activity.compose.BackHandler import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.calculateEndPadding import androidx.compose.foundation.layout.calculateStartPadding import androidx.compose.foundation.layout.consumeWindowInsets import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.navigationBars import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.plus +import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.lazy.rememberLazyListState import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ExperimentalMaterial3ExpressiveApi @@ -204,6 +207,9 @@ private fun HomeScaffold( floatingActionButton = { val coroutineScope = rememberCoroutineScope() HomeBottomBar( + // The Scaffold uses top-only insets so the scrollable content can go edge-to-edge behind the + // navigation bar, so the floating toolbar has to apply the bottom inset itself to avoid overlapping it. + modifier = Modifier.windowInsetsPadding(WindowInsets.navigationBars), currentHomeNavigationBarItem = state.currentHomeNavigationBarItem, onItemClick = { item -> // scroll to top if selecting the same item