new: add loading overlay for WebView widget while pages load

This commit is contained in:
Antoine Jaury committed 2026-07-08 17:08:02 +02:00
1 parent bb10764178
commit b063dfaff6
9 files changed
+165 -11

No files matched your search

@@ -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)
}