mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-05 12:54:35 +00:00
Merge pull request #7825 from element-hq/feature/fga/fix-home-scroll-connection
Fix home screen top bar consuming its own scroll events
This commit is contained in:
+9
-1
@@ -184,7 +184,7 @@ private fun HomeScaffold(
|
||||
val spacesLazyListState = rememberLazyListState()
|
||||
|
||||
Scaffold(
|
||||
modifier = modifier.nestedScroll(scrollBehavior.nestedScrollConnection),
|
||||
modifier = modifier,
|
||||
topBar = {
|
||||
HomeTopBar(
|
||||
selectedNavigationItem = state.currentHomeNavigationBarItem,
|
||||
@@ -265,6 +265,13 @@ private fun HomeScaffold(
|
||||
val contentPadding = PaddingValues(
|
||||
bottom = 96.dp,
|
||||
)
|
||||
// The nested scroll connection is set on the content and not on the Scaffold, else the top bar would
|
||||
// consume the scroll events of its own content.
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.nestedScroll(scrollBehavior.nestedScrollConnection)
|
||||
) {
|
||||
when (state.currentHomeNavigationBarItem) {
|
||||
HomeNavigationBarItem.Chats -> {
|
||||
RoomListContentView(
|
||||
@@ -303,6 +310,7 @@ private fun HomeScaffold(
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
snackbarHost = { SnackbarHost(snackbarHostState) },
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user