From 428b16cda2ad859453afcc9a653e20607d72a0f9 Mon Sep 17 00:00:00 2001 From: lunaticbum Date: Sun, 27 Jul 2025 19:37:17 +0900 Subject: [PATCH] ... --- .../kotlin/bums/lunatic/launcher/home/GeckoWeb.kt | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/src/main/kotlin/bums/lunatic/launcher/home/GeckoWeb.kt b/app/src/main/kotlin/bums/lunatic/launcher/home/GeckoWeb.kt index 8a2a77b4..462197f8 100644 --- a/app/src/main/kotlin/bums/lunatic/launcher/home/GeckoWeb.kt +++ b/app/src/main/kotlin/bums/lunatic/launcher/home/GeckoWeb.kt @@ -363,6 +363,19 @@ class GeckoWeb : BWebview { if (url.contains(getFilterF()) && privateMode) { this@GeckoWeb.visibility = View.INVISIBLE } + if (url?.startsWith("magnet:?") == true) { + Uri.parse(url)?.let { + context.startActivity(Intent().apply { + action = Intent.ACTION_VIEW + flags = + Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS.or(FLAG_ACTIVITY_CLEAR_TOP) + .or( + FLAG_ACTIVITY_NEW_TASK + ) + data = it + }) + } + } } override fun onPageStop(session: GeckoSession, success: Boolean) {