mirror of
				https://github.com/SimpleMobileTools/Simple-Contacts.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	properly show locally stored contact names at the Recents tab
This commit is contained in:
		| @@ -540,6 +540,15 @@ class MainActivity : SimpleActivity(), RefreshContactsListener { | ||||
|  | ||||
|         if (refreshTabsMask and RECENTS_TAB_MASK != 0) { | ||||
|             ContactsHelper(this).getRecents { | ||||
|                 val localContacts = LocalContactsHelper(applicationContext).getAllContacts() | ||||
|                 it.filter { it.name == null }.forEach { | ||||
|                     val namelessCall = it | ||||
|                     val localContact = localContacts.firstOrNull { it.doesContainPhoneNumber(namelessCall.number) } | ||||
|                     if (localContact != null) { | ||||
|                         it.name = localContact.getNameToDisplay() | ||||
|                     } | ||||
|                 } | ||||
|  | ||||
|                 runOnUiThread { | ||||
|                     recents_fragment?.updateRecentCalls(it) | ||||
|                 } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user