Merge pull request #1419 from android/av/fix-state-loss-with-workaround

Fix state loss with workaround
pull/1478/head
Don Turner 7 months ago committed by GitHub
commit 8a15a61a50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -219,13 +219,14 @@ internal fun NiaApp(
}
Box(
modifier = if (shouldShowTopAppBar) {
Modifier.consumeWindowInsets(
WindowInsets.safeDrawing.only(WindowInsetsSides.Top),
)
// Workaround for https://issuetracker.google.com/338478720
modifier = Modifier.consumeWindowInsets(
if (shouldShowTopAppBar) {
WindowInsets.safeDrawing.only(WindowInsetsSides.Top)
} else {
Modifier
WindowInsets(0, 0, 0, 0)
},
),
) {
NiaNavHost(
appState = appState,

Loading…
Cancel
Save