Skip to content

Commit

Permalink
Merge pull request #1419 from android/av/fix-state-loss-with-workaround
Browse files Browse the repository at this point in the history
Fix state loss with workaround
  • Loading branch information
dturner authored May 29, 2024
2 parents b0007bb + 488b97a commit 8a15a61
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8a15a61

Please sign in to comment.