do not mess with the phone numbers if they arent shown anyway
This commit is contained in:
parent
f9bd62b2a7
commit
72ccd10aa1
1 changed files with 33 additions and 28 deletions
|
|
@ -200,10 +200,10 @@ class ViewContactActivity : ContactActivity() {
|
||||||
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
|
window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN)
|
||||||
setupFavorite()
|
setupFavorite()
|
||||||
setupNames()
|
setupNames()
|
||||||
setupContactSources()
|
|
||||||
|
|
||||||
getDuplicateContacts {
|
getDuplicateContacts {
|
||||||
setupPhoneNumbers()
|
setupPhoneNumbers()
|
||||||
|
setupContactSources()
|
||||||
}
|
}
|
||||||
|
|
||||||
setupEmails()
|
setupEmails()
|
||||||
|
|
@ -280,6 +280,7 @@ class ViewContactActivity : ContactActivity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupPhoneNumbers() {
|
private fun setupPhoneNumbers() {
|
||||||
|
if (showFields and SHOW_PHONE_NUMBERS_FIELD != 0) {
|
||||||
var phoneNumbers = contact!!.phoneNumbers.toMutableSet() as LinkedHashSet<PhoneNumber>
|
var phoneNumbers = contact!!.phoneNumbers.toMutableSet() as LinkedHashSet<PhoneNumber>
|
||||||
duplicateContacts.forEach {
|
duplicateContacts.forEach {
|
||||||
phoneNumbers.addAll(it.phoneNumbers)
|
phoneNumbers.addAll(it.phoneNumbers)
|
||||||
|
|
@ -294,7 +295,7 @@ class ViewContactActivity : ContactActivity() {
|
||||||
}.toMutableSet() as LinkedHashSet<PhoneNumber>
|
}.toMutableSet() as LinkedHashSet<PhoneNumber>
|
||||||
|
|
||||||
contact_numbers_holder.removeAllViews()
|
contact_numbers_holder.removeAllViews()
|
||||||
if (phoneNumbers.isNotEmpty() && showFields and SHOW_PHONE_NUMBERS_FIELD != 0) {
|
if (phoneNumbers.isNotEmpty()) {
|
||||||
phoneNumbers.forEach {
|
phoneNumbers.forEach {
|
||||||
layoutInflater.inflate(R.layout.item_view_phone_number, contact_numbers_holder, false).apply {
|
layoutInflater.inflate(R.layout.item_view_phone_number, contact_numbers_holder, false).apply {
|
||||||
val phoneNumber = it
|
val phoneNumber = it
|
||||||
|
|
@ -320,6 +321,10 @@ class ViewContactActivity : ContactActivity() {
|
||||||
contact_numbers_image.beGone()
|
contact_numbers_image.beGone()
|
||||||
contact_numbers_holder.beGone()
|
contact_numbers_holder.beGone()
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
contact_numbers_image.beGone()
|
||||||
|
contact_numbers_holder.beGone()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setupEmails() {
|
private fun setupEmails() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue