fix(ui): dynamically shrink EmptyHero bottom spacer on keyboard open to keep greeting visible
This commit is contained in:
parent
7b012d1041
commit
2c3d057641
1 changed files with 6 additions and 1 deletions
|
|
@ -162,7 +162,12 @@ fun EmptyHero(userName: String, onPick: (String) -> Unit, modifier: Modifier = M
|
||||||
SuggestionPills(onPick)
|
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))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue