Skip to content

Commit 501d29b

Browse files
committed
Add back spacer for navigation bar
1 parent dbff140 commit 501d29b

File tree

1 file changed

+14
-9
lines changed
  • feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou

1 file changed

+14
-9
lines changed

feature/foryou/src/main/java/com/google/samples/apps/nowinandroid/feature/foryou/ForYouScreen.kt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@ import androidx.compose.foundation.layout.BoxWithConstraints
2424
import androidx.compose.foundation.layout.Column
2525
import androidx.compose.foundation.layout.PaddingValues
2626
import androidx.compose.foundation.layout.Row
27+
import androidx.compose.foundation.layout.Spacer
28+
import androidx.compose.foundation.layout.WindowInsets
2729
import androidx.compose.foundation.layout.fillMaxSize
2830
import androidx.compose.foundation.layout.fillMaxWidth
31+
import androidx.compose.foundation.layout.height
2932
import androidx.compose.foundation.layout.heightIn
3033
import androidx.compose.foundation.layout.padding
34+
import androidx.compose.foundation.layout.safeDrawing
3135
import androidx.compose.foundation.layout.size
3236
import androidx.compose.foundation.layout.width
37+
import androidx.compose.foundation.layout.windowInsetsBottomHeight
3338
import androidx.compose.foundation.lazy.LazyListScope
3439
import androidx.compose.foundation.lazy.grid.GridCells
3540
import androidx.compose.foundation.lazy.grid.GridCells.Adaptive
@@ -175,15 +180,15 @@ internal fun ForYouScreen(
175180
onNewsResourcesCheckedChanged = onNewsResourcesCheckedChanged,
176181
)
177182

178-
/*item(span = { GridItemSpan(maxLineSpan) }) {
179-
Column {
180-
Spacer(modifier = Modifier.height(8.dp))
181-
// Add space for the content to clear the "offline" snackbar.
182-
// TODO: Check that the Scaffold handles this correctly in NiaApp
183-
if (isOffline) Spacer(modifier = Modifier.height(48.dp))
184-
Spacer(Modifier.windowInsetsBottomHeight(WindowInsets.safeDrawing))
185-
}
186-
}*/
183+
item(span = { GridItemSpan(maxLineSpan) }) {
184+
Column {
185+
Spacer(modifier = Modifier.height(8.dp))
186+
// Add space for the content to clear the "offline" snackbar.
187+
// TODO: Check that the Scaffold handles this correctly in NiaApp
188+
// if (isOffline) Spacer(modifier = Modifier.height(48.dp))
189+
Spacer(Modifier.windowInsetsBottomHeight(WindowInsets.safeDrawing))
190+
}
191+
}
187192
}
188193
AnimatedVisibility(
189194
visible = isSyncing ||

0 commit comments

Comments
 (0)