mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
move duplicate checking at View screen in a separate function
This commit is contained in:
@@ -205,7 +205,8 @@ class ViewContactActivity : ContactActivity() {
|
||||
setupOrganization()
|
||||
setupWebsites()
|
||||
setupGroups()
|
||||
addContactSources()
|
||||
setupContactSources()
|
||||
checkDuplicateContacts()
|
||||
}
|
||||
|
||||
private fun launchEditContact(contact: Contact) {
|
||||
@@ -473,11 +474,13 @@ class ViewContactActivity : ContactActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
private fun addContactSources() {
|
||||
private fun setupContactSources() {
|
||||
if (contact_sources_holder.childCount == 0) {
|
||||
addContactSource(contact!!)
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkDuplicateContacts() {
|
||||
ContactsHelper(this).getDuplicatesOfContact(contact!!, false) { contacts ->
|
||||
val currContactSources = contacts.map { it.source }
|
||||
runOnUiThread {
|
||||
|
Reference in New Issue
Block a user