fix(ime): union nav-bar and IME insets on the two remaining bare-Scaffold forms

Sweep of every imePadding() in the app for the same nav-bar-over-IME
double-count fixed for the chats. Two more bare Material3 Scaffold screens
applied the scaffold content padding (which carries the nav-bar inset) and
then imePadding() without consuming in between, so the nav bar stacked on top
of the IME while the keyboard was up:

- NewGeohashChatScreen (geohash create form)
- MarmotGroupInfoScreen (has the add-member search field)

Both now consumeWindowInsets(pad) before imePadding(), matching the idiom the
other forms already use. Every other imePadding() call was verified fine:
DisappearingScaffold-based screens are handled by the scaffold's own
reservation, dialogs/bottom sheets carry no nav-bar content padding, and the
rest either apply imePadding() alone at a root or already use the
navigationBarsPadding()/consumeWindowInsets union.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012dT2RLbPZzan2hULL2cmc6
This commit is contained in:
Claude
2026-07-28 17:25:34 +00:00
parent 39e272f478
commit eeefacca9e
2 changed files with 8 additions and 0 deletions
@@ -25,6 +25,7 @@ import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.consumeWindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.imePadding
@@ -106,6 +107,9 @@ fun NewGeohashChatScreen(
.fillMaxSize()
.padding(top = pad.calculateTopPadding(), bottom = pad.calculateBottomPadding())
.padding(horizontal = 16.dp)
// consume the scaffold insets so the trailing imePadding() only adds the part of
// the IME the nav-bar padding above doesn't already cover (union, not a sum).
.consumeWindowInsets(pad)
.verticalScroll(rememberScrollState())
.imePadding(),
verticalArrangement = Arrangement.spacedBy(20.dp),
@@ -32,6 +32,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.consumeWindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.imePadding
@@ -171,6 +172,9 @@ fun MarmotGroupInfoScreen(
Modifier
.fillMaxSize()
.padding(padding)
// consume the scaffold insets so imePadding() unions with the nav-bar inset in
// `padding` instead of stacking on top of it while the keyboard is up.
.consumeWindowInsets(padding)
.imePadding(),
) {
// Group header section (fixed at top)