mirror of
https://github.com/SimpleMobileTools/Simple-Dialer.git
synced 2025-06-05 21:49:23 +02:00
show labels too at calling contacts with multiple numbers
This commit is contained in:
@ -102,11 +102,12 @@ class FavoritesFragment(context: Context, attributeSet: AttributeSet) : MyViewPa
|
|||||||
} else {
|
} else {
|
||||||
val items = ArrayList<RadioItem>()
|
val items = ArrayList<RadioItem>()
|
||||||
phoneNumbers.forEachIndexed { index, phoneNumber ->
|
phoneNumbers.forEachIndexed { index, phoneNumber ->
|
||||||
items.add(RadioItem(index, phoneNumber.normalizedNumber))
|
val type = context.getPhoneNumberTypeText(phoneNumber.type, phoneNumber.label)
|
||||||
|
items.add(RadioItem(index, "${phoneNumber.normalizedNumber} ($type)", phoneNumber.normalizedNumber))
|
||||||
}
|
}
|
||||||
|
|
||||||
RadioGroupDialog(activity!!, items) {
|
RadioGroupDialog(activity!!, items) {
|
||||||
activity?.launchCallIntent(phoneNumbers[it as Int].normalizedNumber)
|
activity?.launchCallIntent(it as String)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user