Fix incorrect handling of shared text with commas

This commit is contained in:
Moez Bhatti
2021-03-01 00:35:54 -05:00
parent 2bce012604
commit 48a0803bc4
@@ -67,8 +67,7 @@ class ComposeActivityModule {
?: activity.intent.extras?.getString("sms_body") ?: activity.intent.extras?.getString("sms_body")
?: activity.intent?.decodedDataString() ?: activity.intent?.decodedDataString()
?.substringAfter('?') // Query string ?.substringAfter('?') // Query string
?.split(',') ?.takeIf { it.startsWith("body") }
?.firstOrNull { param -> param.startsWith("body") }
?.substringAfter('=') ?.substringAfter('=')
?: "") ?: "")
} }