diff --git a/app/src/main/kotlin/com/google/samples/apps/nowinandroid/ui/NiaApp.kt b/app/src/main/kotlin/com/google/samples/apps/nowinandroid/ui/NiaApp.kt index 218ea8625..b47984ddb 100644 --- a/app/src/main/kotlin/com/google/samples/apps/nowinandroid/ui/NiaApp.kt +++ b/app/src/main/kotlin/com/google/samples/apps/nowinandroid/ui/NiaApp.kt @@ -219,13 +219,14 @@ internal fun NiaApp( } Box( - modifier = if (shouldShowTopAppBar) { - Modifier.consumeWindowInsets( - WindowInsets.safeDrawing.only(WindowInsetsSides.Top), - ) - } else { - Modifier - }, + // Workaround for https://issuetracker.google.com/338478720 + modifier = Modifier.consumeWindowInsets( + if (shouldShowTopAppBar) { + WindowInsets.safeDrawing.only(WindowInsetsSides.Top) + } else { + WindowInsets(0, 0, 0, 0) + }, + ), ) { NiaNavHost( appState = appState,