mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-22 17:31:52 +01:00
Fix loading progress not showing in webview (#7243)
* Fix loading progress not showing in webview * Review Changes
This commit is contained in:
parent
6ddd6ed0e3
commit
0e1e57c1c3
@ -20,6 +20,7 @@ import androidx.compose.runtime.remember
|
|||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
import androidx.compose.ui.platform.LocalContext
|
import androidx.compose.ui.platform.LocalContext
|
||||||
import androidx.compose.ui.res.stringResource
|
import androidx.compose.ui.res.stringResource
|
||||||
|
import androidx.compose.ui.zIndex
|
||||||
import com.google.accompanist.web.AccompanistWebViewClient
|
import com.google.accompanist.web.AccompanistWebViewClient
|
||||||
import com.google.accompanist.web.LoadingState
|
import com.google.accompanist.web.LoadingState
|
||||||
import com.google.accompanist.web.WebView
|
import com.google.accompanist.web.WebView
|
||||||
@ -106,12 +107,14 @@ fun WebViewScreen(
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
Box(modifier = Modifier.weight(1f)) {
|
Box {
|
||||||
val loadingState = state.loadingState
|
val loadingState = state.loadingState
|
||||||
if (loadingState is LoadingState.Loading) {
|
if (loadingState is LoadingState.Loading) {
|
||||||
LinearProgressIndicator(
|
LinearProgressIndicator(
|
||||||
progress = loadingState.progress,
|
progress = loadingState.progress,
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.zIndex(1f),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user