From 0e1e57c1c38e6db6b76f16849cdef3eaba66864d Mon Sep 17 00:00:00 2001 From: AntsyLich <59261191+AntsyLich@users.noreply.github.com> Date: Sat, 4 Jun 2022 22:44:20 +0600 Subject: [PATCH] Fix loading progress not showing in webview (#7243) * Fix loading progress not showing in webview * Review Changes --- .../java/eu/kanade/presentation/webview/WebViewScreen.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/presentation/webview/WebViewScreen.kt b/app/src/main/java/eu/kanade/presentation/webview/WebViewScreen.kt index 9cd9652ff1..f59568e2ac 100644 --- a/app/src/main/java/eu/kanade/presentation/webview/WebViewScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/webview/WebViewScreen.kt @@ -20,6 +20,7 @@ import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource +import androidx.compose.ui.zIndex import com.google.accompanist.web.AccompanistWebViewClient import com.google.accompanist.web.LoadingState import com.google.accompanist.web.WebView @@ -106,12 +107,14 @@ fun WebViewScreen( }, ) - Box(modifier = Modifier.weight(1f)) { + Box { val loadingState = state.loadingState if (loadingState is LoadingState.Loading) { LinearProgressIndicator( progress = loadingState.progress, - modifier = Modifier.fillMaxWidth(), + modifier = Modifier + .fillMaxWidth() + .zIndex(1f), ) }