diff --git a/composeApp/src/androidMain/AndroidManifest.xml b/composeApp/src/androidMain/AndroidManifest.xml
index 5855a618..34e71252 100644
--- a/composeApp/src/androidMain/AndroidManifest.xml
+++ b/composeApp/src/androidMain/AndroidManifest.xml
@@ -68,7 +68,7 @@
-
+
diff --git a/composeApp/src/androidMain/kotlin/org/ooni/probe/MainActivity.kt b/composeApp/src/androidMain/kotlin/org/ooni/probe/MainActivity.kt
index 717d2c5c..3f03c745 100644
--- a/composeApp/src/androidMain/kotlin/org/ooni/probe/MainActivity.kt
+++ b/composeApp/src/androidMain/kotlin/org/ooni/probe/MainActivity.kt
@@ -53,27 +53,29 @@ class MainActivity : ComponentActivity() {
private fun manageIntent(intent: Intent) {
if (intent.action != Intent.ACTION_VIEW && intent.action != Intent.ACTION_SEND) return
- if (intent.action == Intent.ACTION_VIEW) {
- val uri = intent.data ?: return
- when (uri.host) {
- "runv2",
- OrganizationConfig.ooniRunDomain,
- -> {
- val id = uri.lastPathSegment ?: return
- deepLinkFlow.tryEmit(DeepLink.AddDescriptor(id))
- }
+ when (intent.action) {
+ Intent.ACTION_VIEW -> {
+ val uri = intent.data ?: return
+ when (uri.host) {
+ "runv2",
+ OrganizationConfig.ooniRunDomain,
+ -> {
+ val id = uri.lastPathSegment ?: return
+ deepLinkFlow.tryEmit(DeepLink.AddDescriptor(id))
+ }
- else -> {
- Logger.e { "Unknown deep link: $uri" }
+ else -> {
+ Logger.e { "Unknown deep link: $uri" }
+ }
}
}
- } else if (intent.action == Intent.ACTION_SEND) {
- val url = intent.getStringExtra(Intent.EXTRA_TEXT) ?: return
- if (Patterns.WEB_URL.matcher(url).matches()) {
- deepLinkFlow.tryEmit(DeepLink.RunUrls(url))
- } else {
- Logger.e { "Unknown deep link: $url" }
- return
+ Intent.ACTION_SEND -> {
+ val url = intent.getStringExtra(Intent.EXTRA_TEXT) ?: return
+ if (Patterns.WEB_URL.matcher(url).matches()) {
+ deepLinkFlow.tryEmit(DeepLink.RunUrls(url))
+ } else {
+ return
+ }
}
}
}
diff --git a/composeApp/src/commonMain/kotlin/org/ooni/probe/App.kt b/composeApp/src/commonMain/kotlin/org/ooni/probe/App.kt
index d031324a..6274aa61 100644
--- a/composeApp/src/commonMain/kotlin/org/ooni/probe/App.kt
+++ b/composeApp/src/commonMain/kotlin/org/ooni/probe/App.kt
@@ -26,7 +26,6 @@ import org.ooni.probe.shared.PlatformInfo
import org.ooni.probe.ui.navigation.BottomNavigationBar
import org.ooni.probe.ui.navigation.Navigation
import org.ooni.probe.ui.navigation.Screen
-import org.ooni.probe.ui.navigation.safeNavigate
import org.ooni.probe.ui.theme.AppTheme
@Composable