Fixed missing plus sign when opened from another app (#107)

This commit is contained in:
Agnieszka C 2021-09-08 19:06:33 +02:00
parent b731348f14
commit 9b0fe07fab
2 changed files with 42 additions and 2 deletions

View file

@ -102,7 +102,7 @@ class NewConversationActivity : SimpleActivity() {
private fun isThirdPartyIntent(): Boolean {
if ((intent.action == Intent.ACTION_SENDTO || intent.action == Intent.ACTION_SEND || intent.action == Intent.ACTION_VIEW) && intent.dataString != null) {
val number = intent.dataString!!.removePrefix("sms:").removePrefix("smsto:").removePrefix("mms").removePrefix("mmsto:").trim()
val number = intent.dataString!!.removePrefix("sms:").removePrefix("smsto:").removePrefix("mms").removePrefix("mmsto:").replace("+", "%2b").trim()
launchThreadActivity(URLDecoder.decode(number), "")
finish()
return true