show type at the number picker at new thread

This commit is contained in:
tibbi 2022-02-07 10:09:54 +01:00
parent 9279c66cb3
commit c2339a929d
1 changed files with 3 additions and 2 deletions

View File

@ -148,11 +148,12 @@ class NewConversationActivity : SimpleActivity() {
if (phoneNumbers.size > 1) {
val items = ArrayList<RadioItem>()
phoneNumbers.forEachIndexed { index, phoneNumber ->
items.add(RadioItem(index, phoneNumber.normalizedNumber, phoneNumber))
val type = getPhoneNumberTypeText(phoneNumber.type, phoneNumber.label)
items.add(RadioItem(index, "${phoneNumber.normalizedNumber} ($type)", phoneNumber.normalizedNumber))
}
RadioGroupDialog(this, items) {
launchThreadActivity((it as PhoneNumber).normalizedNumber, contact.name)
launchThreadActivity(it as String, contact.name)
}
} else {
launchThreadActivity(phoneNumbers.first().normalizedNumber, contact.name)