git.iko.soy/parseable-android
on master help sign in
Remove padding from ErrorHandler Scaffold content (#12)

* Fix large top padding caused by nested Scaffold insets The GlobalErrorBoundary wraps the entire app in a Scaffold that applied system bar window inset padding. Each screen also has its own Scaffold with a TopAppBar that handles status bar insets. This double nesting caused the status bar inset to be applied twice, creating a visible gap above the TopAppBar. Fix by zeroing out contentWindowInsets on the outer Scaffold and removing the innerPadding application, since the inner per-screen Scaffolds already handle all inset padding. https://claude.ai/code/session_01NY9VgUppG2HC9Hgi3zMweP * Suppress UnusedMaterial3ScaffoldPaddingParameter lint error The outer Scaffold in GlobalErrorBoundary intentionally ignores the content padding parameter — inset handling is delegated to the per-screen Scaffolds. Suppress the lint check since this is by design. https://claude.ai/code/session_01NY9VgUppG2HC9Hgi3zMweP --------- Co-authored-by: Claude <noreply@anthropic.com>

commitc4927107449cc17f9d7a31c10ce009c9d2ddaed1 authoriko <mail@iko.soy> dateSun 15 Feb 2026, 18:42 (8 months ago) parent4ea48de
1 file changed+5−5
app/src/main/java/com/parseable/android/ui/ErrorHandler.kt+5−5
app/src/main/java/com/parseable/android/ui/ErrorHandler.kt+5−5
@@ -1,8 +1,8 @@
11package com.parseable.android.ui
22
33import androidx.compose.foundation.layout.Box
4+import androidx.compose.foundation.layout.WindowInsets
45import androidx.compose.foundation.layout.fillMaxSize
5−import androidx.compose.foundation.layout.padding
66import androidx.compose.material3.Scaffold
77import androidx.compose.material3.Snackbar
88import androidx.compose.material3.SnackbarDuration
@@ -45,6 +45,7 @@ val LocalErrorHandler = compositionLocalOf<ErrorHandler> {
4545 * posted via the provided [ErrorHandler]. The handler is exposed to the
4646 * entire subtree through [LocalErrorHandler].
4747 */
48+@Suppress("UnusedMaterial3ScaffoldPaddingParameter")
4849@Composable
4950fun GlobalErrorBoundary(
5051 errorHandler: ErrorHandler = remember { ErrorHandler() },
@@ -71,11 +72,10 @@ fun GlobalErrorBoundary(
7172 Snackbar(snackbarData = data)
7273 }
7374 },
74− ) { innerPadding ->
75+ contentWindowInsets = WindowInsets(0, 0, 0, 0),
76+ ) {
7577 Box(
76− modifier = Modifier
77− .fillMaxSize()
78− .padding(innerPadding),
78+ modifier = Modifier.fillMaxSize(),
7979 ) {
8080 content()
8181 }