feat: adjust FAB bottom padding logic in GroupSetupScreen for improved keyboard and emoji panel handling; update font size in SearchScreen
This commit is contained in:
@@ -226,19 +226,6 @@ fun GroupSetupScreen(
|
||||
val density = LocalDensity.current
|
||||
val imeBottomPx = WindowInsets.ime.getBottom(density)
|
||||
val imeBottomDp = with(density) { imeBottomPx.toDp() }
|
||||
// FAB bottom padding: keep FAB at a consistent visual position above any keyboard.
|
||||
// When emoji panel is shown → it's part of Scaffold bottomBar, paddingValues includes it,
|
||||
// so we offset from the *content area* bottom which is already above the emoji panel.
|
||||
// When IME is shown → paddingValues don't include IME, so we add imeBottomDp.
|
||||
// When neither → just a small offset from the bottom.
|
||||
val fabBottomPadding =
|
||||
if (coordinator.isEmojiBoxVisible) {
|
||||
14.dp
|
||||
} else if (imeBottomDp > 0.dp) {
|
||||
14.dp + imeBottomDp
|
||||
} else {
|
||||
18.dp
|
||||
}
|
||||
|
||||
LaunchedEffect(step) {
|
||||
if (step != GroupSetupStep.DETAILS) {
|
||||
@@ -372,16 +359,15 @@ fun GroupSetupScreen(
|
||||
}
|
||||
}
|
||||
) { paddingValues ->
|
||||
Box(
|
||||
modifier =
|
||||
Modifier
|
||||
.fillMaxSize()
|
||||
.padding(paddingValues)
|
||||
) {
|
||||
// Outer Box fills the full Scaffold area (no paddingValues applied)
|
||||
// so the FAB can be positioned consistently above *any* keyboard.
|
||||
Box(modifier = Modifier.fillMaxSize()) {
|
||||
// Content area respects Scaffold padding (topBar + bottomBar/emoji)
|
||||
Column(
|
||||
modifier =
|
||||
Modifier
|
||||
.fillMaxSize()
|
||||
.padding(paddingValues)
|
||||
.padding(horizontal = 16.dp)
|
||||
.navigationBarsPadding()
|
||||
) {
|
||||
@@ -742,7 +728,18 @@ fun GroupSetupScreen(
|
||||
modifier =
|
||||
Modifier
|
||||
.align(Alignment.BottomEnd)
|
||||
.padding(end = 16.dp, bottom = fabBottomPadding)
|
||||
.padding(
|
||||
end = 16.dp,
|
||||
// Consistent: always 14dp above whichever keyboard is showing.
|
||||
// This Box ignores paddingValues, so we measure from raw screen bottom.
|
||||
bottom = if (imeBottomDp > 0.dp) {
|
||||
imeBottomDp + 14.dp
|
||||
} else if (coordinator.isEmojiBoxVisible && coordinator.emojiHeight > 0.dp) {
|
||||
coordinator.emojiHeight + 14.dp
|
||||
} else {
|
||||
18.dp
|
||||
}
|
||||
)
|
||||
.size(58.dp)
|
||||
) {
|
||||
if (isLoading && step == GroupSetupStep.DESCRIPTION) {
|
||||
|
||||
@@ -504,7 +504,7 @@ private fun ChatsTabContent(
|
||||
if (recentUsers.isNotEmpty()) {
|
||||
Text(
|
||||
"Clear All",
|
||||
fontSize = 15.sp,
|
||||
fontSize = 13.sp,
|
||||
fontWeight = FontWeight.Normal,
|
||||
color = PrimaryBlue,
|
||||
modifier = Modifier.clickable { RecentSearchesManager.clearAll() }
|
||||
|
||||
Reference in New Issue
Block a user