diff --git a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewMessageActivity.kt b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewMessageActivity.kt index 9c480bd9..5a955acd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewMessageActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/smsmessenger/activities/NewMessageActivity.kt @@ -16,6 +16,8 @@ import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS import com.simplemobiletools.smsmessenger.R import com.simplemobiletools.smsmessenger.adapters.AutoCompleteTextViewAdapter +import com.simplemobiletools.smsmessenger.extensions.getThreadId +import com.simplemobiletools.smsmessenger.extensions.launchThreadActivity import com.simplemobiletools.smsmessenger.models.Contact import kotlinx.android.synthetic.main.activity_new_message.* import kotlinx.android.synthetic.main.item_selected_contact.view.* @@ -67,7 +69,8 @@ class NewMessageActivity : SimpleActivity() { new_message_to.setOnItemClickListener { parent, view, position, id -> val currContacts = (new_message_to.adapter as AutoCompleteTextViewAdapter).resultList val selectedContact = currContacts[position] - addSelectedContact(selectedContact) + hideKeyboard() + launchThreadActivity(getThreadId(selectedContact.phoneNumber).toInt()) } }