new: add loading overlay for WebView widget while pages load
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
package bzh.ajaury.chombev.web.ui
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.LaunchedEffect
|
||||
import androidx.compose.ui.Modifier
|
||||
|
||||
@Composable
|
||||
actual fun PlatformWebView(
|
||||
url: String,
|
||||
darkTheme: Boolean,
|
||||
onLoadingStateChange: (Boolean) -> Unit,
|
||||
modifier: Modifier,
|
||||
) {
|
||||
// Desktop has no bundled web view; offer to open the page in the system browser instead.
|
||||
// Desktop has no bundled web view; nothing loads, so report done and offer the system browser.
|
||||
LaunchedEffect(Unit) { onLoadingStateChange(false) }
|
||||
WebViewUnavailable(url = url, modifier = modifier)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user