load bg colro of webview based on theme

This commit is contained in:
Satindar Dhillon
2023-02-08 15:19:12 -08:00
parent 9bd6b9409c
commit 0bd9df2ccf
2 changed files with 4 additions and 2 deletions

View File

@ -17,8 +17,8 @@ android {
applicationId "app.omnivore.omnivore"
minSdk 26
targetSdk 33
versionCode 20
versionName "0.0.20"
versionCode 21
versionName "0.0.21"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {

View File

@ -109,6 +109,7 @@ fun WebReaderLoadingContainer(slug: String? = null, requestID: String? = null, o
val toolbarHeightPx: Float by webReaderViewModel.currentToolbarHeightLiveData.observeAsState(0.0f)
val maxToolbarHeight = 48.dp
val backgroundColor = if (isSystemInDarkTheme()) Color.Black else Color.White
webReaderViewModel.maxToolbarHeightPx = with(LocalDensity.current) { maxToolbarHeight.roundToPx().toFloat() }
webReaderViewModel.loadItem(slug = slug, requestID = requestID)
@ -116,6 +117,7 @@ fun WebReaderLoadingContainer(slug: String? = null, requestID: String? = null, o
modifier = Modifier
.fillMaxSize()
.systemBarsPadding()
.background(color = backgroundColor)
) {
if (webReaderParams != null) {
WebReader(