android: remove chats bottom gap when tabs bar is hidden
Some checks failed
Android CI / android (push) Has started running
Android Release / release (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
Codex
2026-03-09 21:20:04 +03:00
parent 6328a74c23
commit b75df4967f
3 changed files with 9 additions and 1 deletions

View File

@@ -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.

View File

@@ -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") },

View File

@@ -228,6 +228,7 @@ fun MessengerNavHost(
onOpenChat = { chatId ->
navController.navigate("${Routes.Chat}/$chatId")
},
isMainBarVisible = isMainBarVisible,
onMainBarVisibilityChanged = { isMainBarVisible = it },
)
}