fix: pad Hidden Words screen for bottom nav and gesture bars

The bottom add-word text field sat behind the phone's navigation
and gesture bars. Apply the union of navigation bar and IME insets
to the bottom bar so it clears the system bars and rises with the
keyboard without a double-counted gap.

https://claude.ai/code/session_01KPkQbS9SYTigkkzYGU97Sz
This commit is contained in:
Claude
2026-05-14 18:21:12 +00:00
parent b385088c95
commit 8df02cf8f8
@@ -26,10 +26,14 @@ import androidx.compose.foundation.combinedClickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.ime
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.union
import androidx.compose.foundation.layout.windowInsetsPadding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.lazy.rememberLazyListState
@@ -83,7 +87,6 @@ fun HiddenWordsScreen(
var selected by remember { mutableStateOf(setOf<String>()) }
Scaffold(
modifier = Modifier.imePadding(),
topBar = {
BlockListTopBar(
title = R.string.hidden_words,
@@ -104,7 +107,10 @@ fun HiddenWordsScreen(
)
},
bottomBar = {
Surface(tonalElevation = 3.dp) {
Surface(
tonalElevation = 3.dp,
modifier = Modifier.windowInsetsPadding(WindowInsets.navigationBars.union(WindowInsets.ime)),
) {
AddMuteWordTextField(accountViewModel)
}
},