mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-02-03 18:57:30 +01:00
fix wrong sender name in SMS notification
This commit is contained in:
parent
91d81e3bd8
commit
492cbdf13a
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user