From e999c3a275b46f927eb3e7b57cb3609063e73465 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 10 Apr 2018 22:07:41 +0200 Subject: [PATCH] try parsing contact name from Insert intent, related to #125 --- .../contacts/activities/EditContactActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/EditContactActivity.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/EditContactActivity.kt index b709f418..2a666f60 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/activities/EditContactActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/activities/EditContactActivity.kt @@ -49,6 +49,7 @@ class EditContactActivity : ContactActivity() { private val REMOVE_PHOTO = 3 private val KEY_PHONE = "phone" + private val KEY_NAME = "name" private var wasActivityInitialized = false private var lastPhotoIntentUri: Uri? = null @@ -150,6 +151,9 @@ class EditContactActivity : ContactActivity() { val phoneNumber = intent.extras.get(KEY_PHONE).toString() contact!!.phoneNumbers.add(PhoneNumber(phoneNumber, DEFAULT_PHONE_NUMBER_TYPE)) setupPhoneNumbers() + + val contactFullName = intent.extras.get(KEY_NAME).toString() + contact_first_name.setText(contactFullName) } setupTypePickers()