lets check those private contacts only if we actually have any
This commit is contained in:
parent
83dcc7423c
commit
422ccf4b6a
2 changed files with 16 additions and 12 deletions
|
|
@ -151,9 +151,11 @@ class MainActivity : SimpleActivity() {
|
|||
|
||||
// check if no message came from a privately stored contact in Simple Contacts
|
||||
val privateContacts = MyContactsContentProvider.getSimpleContacts(this, privateCursor)
|
||||
conversations.filter { it.title == it.phoneNumber }.forEach { conversation ->
|
||||
privateContacts.firstOrNull { it.phoneNumber == conversation.phoneNumber }?.apply {
|
||||
conversation.title = name
|
||||
if (privateContacts.isNotEmpty()) {
|
||||
conversations.filter { it.title == it.phoneNumber }.forEach { conversation ->
|
||||
privateContacts.firstOrNull { it.phoneNumber == conversation.phoneNumber }?.apply {
|
||||
conversation.title = name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue