making phone key nullable at Edit screen

This commit is contained in:
tibbi 2018-04-13 15:25:59 +02:00
parent de864f362c
commit 1cb0d1b1bd
1 changed files with 1 additions and 1 deletions

View File

@ -149,7 +149,7 @@ class EditContactActivity : ContactActivity() {
} }
if (contact!!.id == 0 && intent.extras?.containsKey(KEY_PHONE) == true && (action == Intent.ACTION_INSERT_OR_EDIT || action == Intent.ACTION_INSERT)) { if (contact!!.id == 0 && intent.extras?.containsKey(KEY_PHONE) == true && (action == Intent.ACTION_INSERT_OR_EDIT || action == Intent.ACTION_INSERT)) {
val phoneNumber = intent.extras.get(KEY_PHONE).toString() ?: "" val phoneNumber = intent.extras.get(KEY_PHONE)?.toString() ?: ""
contact!!.phoneNumbers.add(PhoneNumber(phoneNumber, DEFAULT_PHONE_NUMBER_TYPE)) contact!!.phoneNumbers.add(PhoneNumber(phoneNumber, DEFAULT_PHONE_NUMBER_TYPE))
setupPhoneNumbers() setupPhoneNumbers()