Skip to content

Commit 1cb0d1b

Browse files
committed
making phone key nullable at Edit screen
1 parent de864f3 commit 1cb0d1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/activities/EditContactActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ class EditContactActivity : ContactActivity() {
149149
}
150150

151151
if (contact!!.id == 0 && intent.extras?.containsKey(KEY_PHONE) == true && (action == Intent.ACTION_INSERT_OR_EDIT || action == Intent.ACTION_INSERT)) {
152-
val phoneNumber = intent.extras.get(KEY_PHONE).toString() ?: ""
152+
val phoneNumber = intent.extras.get(KEY_PHONE)?.toString() ?: ""
153153
contact!!.phoneNumbers.add(PhoneNumber(phoneNumber, DEFAULT_PHONE_NUMBER_TYPE))
154154
setupPhoneNumbers()
155155

0 commit comments

Comments
 (0)