From 4796dceb9edf8c1809ecfcd349f75031655736bf Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 27 Apr 2026 18:07:07 +0000 Subject: [PATCH] fix(nests): respect status / nav bar insets in NestFullScreen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The room content was sliding under the status bar at the top and the gesture / nav bar at the bottom because the outer Column only had fillMaxSize + 16dp content padding. With Amethyst running edge-to-edge the title cropped behind the status bar and the chat composer / Leave button sat under the system nav bar. Wrap the content Column in `windowInsetsPadding(WindowInsets.safeDrawing)` INSIDE NestThemedScope but BEFORE the existing 16dp padding, so: - The themed background color + optional `bg` image still paint edge-to-edge (NestThemedScope's outer Box stays full-bleed). - The room body — title, participants, chat, talk row, Leave — is inset within the safe-drawing area. PIP screen unchanged; the system manages PIP layout itself. https://claude.ai/code/session_01RDpuki4t8StSg1CZcXnV5b --- .../ui/screen/loggedIn/nests/room/NestFullScreen.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/NestFullScreen.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/NestFullScreen.kt index 4f3d19fee..17b5c2018 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/NestFullScreen.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/nests/room/NestFullScreen.kt @@ -28,9 +28,12 @@ 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.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.safeDrawing +import androidx.compose.foundation.layout.windowInsetsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll import androidx.compose.material3.AlertDialog @@ -95,10 +98,17 @@ internal fun NestFullScreen( ) { val roomTheme = androidx.compose.runtime.remember(event) { RoomTheme.from(event) } NestThemedScope(theme = roomTheme, accountViewModel = accountViewModel) { + // Inset the room content inside the system bars so the title + // doesn't slide under the status bar and the Leave / chat + // composer don't sit beneath the gesture / nav bar. The + // themed background color and `bg` image still paint + // edge-to-edge — they live on NestThemedScope's outer Box, + // which is intentionally outside this padding. Column( modifier = Modifier .fillMaxSize() + .windowInsetsPadding(WindowInsets.safeDrawing) .padding(16.dp) .verticalScroll(rememberScrollState()), ) {