all: override LocalUriHandler with UrlLauncher

This commit is contained in:
Harsh Shandilya 2021-10-28 22:16:05 +05:30
parent 26a96d9116
commit 9d538b4600
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
2 changed files with 10 additions and 2 deletions

View file

@ -9,6 +9,7 @@ import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.WindowPlacement
import androidx.compose.ui.window.WindowPosition
@ -58,7 +59,10 @@ fun main() = application {
undecorated = true,
onCloseRequest = ::exitApplication,
) {
LobstersTheme(darkTheme = false) {
LobstersTheme(
darkTheme = false,
providedValues = arrayOf(LocalUriHandler provides urlLauncher),
) {
Box(
modifier = Modifier.fillMaxSize(),
) {