fix(ui): dynamically shrink EmptyHero bottom spacer on keyboard open to keep greeting visible

This commit is contained in:
Bruno Deanoz 2026-06-18 17:03:55 +02:00
parent 7b012d1041
commit 2c3d057641

View file

@ -162,7 +162,12 @@ fun EmptyHero(userName: String, onPick: (String) -> Unit, modifier: Modifier = M
SuggestionPills(onPick)
}
Spacer(Modifier.height(142.dp)) // Clear the floating bottom dock
// Dynamically shrink the bottom spacer when the keyboard is open.
// This ensures the remaining elements fit perfectly into the space above the keyboard
// without causing the column to exceed the screen height and trigger an automatic scroll.
// As a result, the greeting remains perfectly stationary and visible while typing!
val bottomSpacerHeight = if (isKeyboardOpen) 72.dp else 142.dp
Spacer(Modifier.height(bottomSpacerHeight))
}
}