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()
|
setupOrganization()
|
||||||
setupWebsites()
|
setupWebsites()
|
||||||
setupGroups()
|
setupGroups()
|
||||||
addContactSources()
|
setupContactSources()
|
||||||
|
checkDuplicateContacts()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun launchEditContact(contact: Contact) {
|
private fun launchEditContact(contact: Contact) {
|
||||||
@@ -473,11 +474,13 @@ class ViewContactActivity : ContactActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addContactSources() {
|
private fun setupContactSources() {
|
||||||
if (contact_sources_holder.childCount == 0) {
|
if (contact_sources_holder.childCount == 0) {
|
||||||
addContactSource(contact!!)
|
addContactSource(contact!!)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun checkDuplicateContacts() {
|
||||||
ContactsHelper(this).getDuplicatesOfContact(contact!!, false) { contacts ->
|
ContactsHelper(this).getDuplicatesOfContact(contact!!, false) { contacts ->
|
||||||
val currContactSources = contacts.map { it.source }
|
val currContactSources = contacts.map { it.source }
|
||||||
runOnUiThread {
|
runOnUiThread {
|
||||||
|
Reference in New Issue
Block a user