avoid showing contacts without phone numbers at the dialpad
This commit is contained in:
parent
7730baff13
commit
846f668d59
|
@ -137,10 +137,14 @@ class DialpadActivity : SimpleActivity() {
|
||||||
dialpad_call_button.setOnClickListener { initCall(dialpad_input.value, 0) }
|
dialpad_call_button.setOnClickListener { initCall(dialpad_input.value, 0) }
|
||||||
dialpad_input.onTextChangeListener { dialpadValueChanged(it) }
|
dialpad_input.onTextChangeListener { dialpadValueChanged(it) }
|
||||||
dialpad_input.requestFocus()
|
dialpad_input.requestFocus()
|
||||||
|
|
||||||
ContactsHelper(this).getContacts{ gotContacts(it) }
|
|
||||||
dialpad_input.disableKeyboard()
|
dialpad_input.disableKeyboard()
|
||||||
|
|
||||||
|
ContactsHelper(this).getContacts { allContacts ->
|
||||||
|
val contactsWithNumber = allContacts.filter { it.phoneNumbers.isNotEmpty() }.toList() as ArrayList<Contact>
|
||||||
|
gotContacts(contactsWithNumber)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
val properPrimaryColor = getProperPrimaryColor()
|
val properPrimaryColor = getProperPrimaryColor()
|
||||||
val callIconId = if (areMultipleSIMsAvailable()) {
|
val callIconId = if (areMultipleSIMsAvailable()) {
|
||||||
val callIcon = resources.getColoredDrawableWithColor(R.drawable.ic_phone_two_vector, properPrimaryColor.getContrastColor())
|
val callIcon = resources.getColoredDrawableWithColor(R.drawable.ic_phone_two_vector, properPrimaryColor.getContrastColor())
|
||||||
|
|
Loading…
Reference in New Issue