fix wrong sender name in SMS notification
This commit is contained in:
parent
91d81e3bd8
commit
492cbdf13a
1 changed files with 1 additions and 1 deletions
|
|
@ -668,7 +668,7 @@ fun Context.getNameFromAddress(address: String, privateCursor: Cursor?): String
|
||||||
var sender = getNameAndPhotoFromPhoneNumber(address).name
|
var sender = getNameAndPhotoFromPhoneNumber(address).name
|
||||||
if (address == sender) {
|
if (address == sender) {
|
||||||
val privateContacts = MyContactsContentProvider.getSimpleContacts(this, privateCursor)
|
val privateContacts = MyContactsContentProvider.getSimpleContacts(this, privateCursor)
|
||||||
sender = privateContacts.firstOrNull { it.doesContainPhoneNumber(address) }?.name ?: address
|
sender = privateContacts.firstOrNull { it.doesHavePhoneNumber(address) }?.name ?: address
|
||||||
}
|
}
|
||||||
return sender
|
return sender
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue