mirror of
https://github.com/FossifyOrg/Messages.git
synced 2026-06-18 13:28:42 -04:00
fix wrong sender name in SMS notification
This commit is contained in:
@@ -668,7 +668,7 @@ fun Context.getNameFromAddress(address: String, privateCursor: Cursor?): String
|
||||
var sender = getNameAndPhotoFromPhoneNumber(address).name
|
||||
if (address == sender) {
|
||||
val privateContacts = MyContactsContentProvider.getSimpleContacts(this, privateCursor)
|
||||
sender = privateContacts.firstOrNull { it.doesContainPhoneNumber(address) }?.name ?: address
|
||||
sender = privateContacts.firstOrNull { it.doesHavePhoneNumber(address) }?.name ?: address
|
||||
}
|
||||
return sender
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user