Merge pull request #3595 from stefanosansone/fix/android-reader-status-bar

Android - Fix reader status bar color in light mode
This commit is contained in:
Jackson Harper
2024-02-29 09:00:28 +08:00
committed by GitHub
2 changed files with 11 additions and 8 deletions

View File

@ -28,7 +28,7 @@ android {
minSdk = 26
targetSdk = 34
versionCode = 194001
versionName = "0.194.1"
versionName = "0.195.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {

View File

@ -6,6 +6,7 @@ import android.view.View
import androidx.activity.ComponentActivity
import androidx.activity.compose.LocalOnBackPressedDispatcherOwner
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
@ -78,12 +79,14 @@ class WebReaderLoadingContainerActivity : ComponentActivity() {
viewModel.loadItem(slug = slug, requestID = requestID)
enableEdgeToEdge()
setContent {
OmnivoreTheme {
Box(
modifier = Modifier
.fillMaxSize()
.background(color = Color.Black)
.fillMaxSize()
.background(color = if (isSystemInDarkTheme()) Color.Black else Color.White)
) {
if (viewModel.hasFetchError.value == true) {
Text(stringResource(R.string.web_reader_loading_container_error_msg))
@ -499,11 +502,11 @@ fun ReaderTopAppBar(
fun BottomSheetUI(content: @Composable () -> Unit) {
Box(
modifier = Modifier
.wrapContentHeight()
.fillMaxWidth()
.clip(RoundedCornerShape(topEnd = 20.dp, topStart = 20.dp))
.background(Color.White)
.statusBarsPadding()
.wrapContentHeight()
.fillMaxWidth()
.clip(RoundedCornerShape(topEnd = 20.dp, topStart = 20.dp))
.background(Color.White)
.statusBarsPadding()
) {
Scaffold { paddingValues ->
Box(modifier = Modifier.fillMaxSize()) {