Skip to content

Commit a324fcc

Browse files
committed
Fix state loss with workaround
Change-Id: I96025bd8b2f4f59019df95d1391b832249e7dc91
1 parent 3dd4240 commit a324fcc

File tree

1 file changed

+7
-7
lines changed
  • app/src/main/kotlin/com/google/samples/apps/nowinandroid/ui

1 file changed

+7
-7
lines changed

app/src/main/kotlin/com/google/samples/apps/nowinandroid/ui/NiaApp.kt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ internal fun NiaApp(
201201
}
202202

203203
Box(
204-
modifier = if (shouldShowTopAppBar) {
205-
Modifier.consumeWindowInsets(
206-
WindowInsets.safeDrawing.only(WindowInsetsSides.Top),
207-
)
208-
} else {
209-
Modifier
210-
},
204+
modifier = Modifier.consumeWindowInsets(
205+
if (shouldShowTopAppBar) {
206+
WindowInsets.safeDrawing.only(WindowInsetsSides.Top)
207+
} else {
208+
WindowInsets(0, 0, 0, 0)
209+
},
210+
),
211211
) {
212212
NiaNavHost(
213213
appState = appState,

0 commit comments

Comments
 (0)