android: remove chats bottom gap when tabs bar is hidden
This commit is contained in:
@@ -505,3 +505,7 @@
|
||||
- removed extra outer paddings that shifted headers down/right on some pages,
|
||||
- separated content padding from top app bar container.
|
||||
- Result: consistent title baseline and horizontal alignment between main pages.
|
||||
|
||||
### Step 81 - Chats bottom gap fix when tabs bar hidden
|
||||
- Fixed blank gap at the bottom of chats list when global tabs bar auto-hides on scroll.
|
||||
- Chats screen bottom padding is now dynamic and applied only while tabs bar is visible.
|
||||
|
||||
@@ -67,6 +67,7 @@ fun ChatListRoute(
|
||||
onOpenChat: (Long) -> Unit,
|
||||
inviteToken: String?,
|
||||
onInviteTokenConsumed: () -> Unit,
|
||||
isMainBarVisible: Boolean,
|
||||
onMainBarVisibilityChanged: (Boolean) -> Unit,
|
||||
viewModel: ChatListViewModel = hiltViewModel(),
|
||||
) {
|
||||
@@ -90,6 +91,7 @@ fun ChatListRoute(
|
||||
onGlobalSearchChanged = viewModel::onGlobalSearchChanged,
|
||||
onRefresh = viewModel::onPullToRefresh,
|
||||
onOpenChat = onOpenChat,
|
||||
isMainBarVisible = isMainBarVisible,
|
||||
onMainBarVisibilityChanged = onMainBarVisibilityChanged,
|
||||
onCreateGroup = viewModel::createGroup,
|
||||
onCreateChannel = viewModel::createChannel,
|
||||
@@ -116,6 +118,7 @@ fun ChatListScreen(
|
||||
onGlobalSearchChanged: (String) -> Unit,
|
||||
onRefresh: () -> Unit,
|
||||
onOpenChat: (Long) -> Unit,
|
||||
isMainBarVisible: Boolean,
|
||||
onMainBarVisibilityChanged: (Boolean) -> Unit,
|
||||
onCreateGroup: (String, List<Long>) -> Unit,
|
||||
onCreateChannel: (String, String, String?) -> Unit,
|
||||
@@ -172,7 +175,7 @@ fun ChatListScreen(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.then(if (isTabletLayout) Modifier.widthIn(max = 820.dp) else Modifier)
|
||||
.padding(bottom = 92.dp),
|
||||
.padding(bottom = if (isMainBarVisible) 92.dp else 0.dp),
|
||||
) {
|
||||
TopAppBar(
|
||||
title = { Text("Chats") },
|
||||
|
||||
@@ -228,6 +228,7 @@ fun MessengerNavHost(
|
||||
onOpenChat = { chatId ->
|
||||
navController.navigate("${Routes.Chat}/$chatId")
|
||||
},
|
||||
isMainBarVisible = isMainBarVisible,
|
||||
onMainBarVisibilityChanged = { isMainBarVisible = it },
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user