Show contact name and SIP URI in call URI field if label has not been given
This commit is contained in:
@ -69,8 +69,9 @@ sealed class Contact {
|
|||||||
val name = contactWithUri.first.name()
|
val name = contactWithUri.first.name()
|
||||||
if (includeLabel) {
|
if (includeLabel) {
|
||||||
val label = contactWithUri.second.label
|
val label = contactWithUri.second.label
|
||||||
if (label.isNotEmpty()) return "$name $label"
|
if (label.isNotEmpty() && !listOf("SIP", "TEL").contains(label.uppercase()))
|
||||||
if (unique && contactWithUri.first.uris().size > 1)
|
return "$name $label"
|
||||||
|
if (unique || contactWithUri.first.uris().size > 1)
|
||||||
return "$name ${uri.substringAfter(":")}"
|
return "$name ${uri.substringAfter(":")}"
|
||||||
return name
|
return name
|
||||||
}
|
}
|
||||||
@ -83,8 +84,9 @@ sealed class Contact {
|
|||||||
val name = telContactWithUri.first.name()
|
val name = telContactWithUri.first.name()
|
||||||
if (includeLabel) {
|
if (includeLabel) {
|
||||||
val label = telContactWithUri.second.label
|
val label = telContactWithUri.second.label
|
||||||
if (label.isNotEmpty()) return "$name $label"
|
if (label.isNotEmpty() && !listOf("SIP", "TEL").contains(label.uppercase()))
|
||||||
if (unique && telContactWithUri.first.uris().size > 1)
|
return "$name $label"
|
||||||
|
if (unique || telContactWithUri.first.uris().size > 1)
|
||||||
return "$name $userPart"
|
return "$name $userPart"
|
||||||
return name
|
return name
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user