load bg colro of webview based on theme
This commit is contained in:
@ -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 {
|
||||
|
||||
@ -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(
|
||||
|
||||
Reference in New Issue
Block a user