Skip to content

Commit

Permalink
refactor(ExploreScreen): consume window insets
Browse files Browse the repository at this point in the history
  • Loading branch information
urFate committed Sep 12, 2024
1 parent 174459d commit e9e92b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ class MainActivity : ComponentActivity() {
setTheme(R.style.Theme_ShiraBox)

setContent {
ShiraBoxTheme {
ShiraBoxTheme(
transparentStatusBar = true
) {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ package org.shirabox.app.ui.screen.explore

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.consumeWindowInsets
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.material.ExperimentalMaterialApi
Expand Down Expand Up @@ -42,12 +41,11 @@ fun ExploreScreen(
Scaffold(
modifier = Modifier.pullRefresh(pullRefreshState),
snackbarHost = { AppUpdateSnackbarHost() },
contentWindowInsets = WindowInsets(0.dp)
) {
) {
Box (
modifier = Modifier
.fillMaxSize()
.padding(it),
.consumeWindowInsets(it),
contentAlignment = Alignment.TopCenter
){
LazyColumn(
Expand Down

0 comments on commit e9e92b1

Please sign in to comment.