Improved finding of tel URI's contact

This commit is contained in:
Juha Heinanen
2026-05-10 17:58:37 +03:00
parent 4588dabb41
commit efc3e0dedd

View File

@ -76,9 +76,10 @@ sealed class Contact {
fun contactName(uri: String): String {
var contact = findContact(uri)
if (contact == null) {
val userPart = Utils.uriUserPart(uri)
if (Utils.isTelNumber(userPart))
val userPart = Utils.uriUserPart(uri).replace("%23", "#")
if (Utils.isTelNumber(userPart)) {
contact = findContact("tel:$userPart")
}
}
if (contact != null)
return contact.name()