This commit is contained in:
lunaticbum 2025-07-27 19:37:17 +09:00
parent a9cef3b40e
commit 428b16cda2

View File

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