From 78767b35d788d3ff8ebdb8ac93f62ddeb38fa88f Mon Sep 17 00:00:00 2001 From: Bnyro Date: Wed, 1 Jun 2022 07:45:02 +0200 Subject: [PATCH] fix --- .../java/com/github/libretube/RouterActivity.kt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/github/libretube/RouterActivity.kt b/app/src/main/java/com/github/libretube/RouterActivity.kt index 2f0ee8c21..dfd6921df 100644 --- a/app/src/main/java/com/github/libretube/RouterActivity.kt +++ b/app/src/main/java/com/github/libretube/RouterActivity.kt @@ -11,15 +11,12 @@ class RouterActivity : AppCompatActivity() { val TAG = "RouterActivity" override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - // Check if Intent Action is ACTION_SEND - if (intent?.action == Intent.ACTION_SEND) { - if (intent.type == "text/plain" && checkHost(intent)) { - // start the main activity using the given URI as data if the host is known - handleSendText(intent) - } else { - // start app as normal if wrong intent type - restartMainActivity(this) - } + if (checkHost(intent)) { + // start the main activity using the given URI as data if the host is known + handleSendText(intent) + } else { + // start app as normal if URI not in host list + restartMainActivity(this) } }