diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/dialogs/ExportContactsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/dialogs/ExportContactsDialog.kt index d59ada5d..30181648 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/dialogs/ExportContactsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/dialogs/ExportContactsDialog.kt @@ -8,6 +8,7 @@ import com.simplemobiletools.contacts.activities.SimpleActivity import com.simplemobiletools.contacts.adapters.FilterContactSourcesAdapter import com.simplemobiletools.contacts.extensions.config import com.simplemobiletools.contacts.helpers.ContactsHelper +import com.simplemobiletools.contacts.helpers.SMT_PRIVATE import com.simplemobiletools.contacts.models.ContactSource import kotlinx.android.synthetic.main.dialog_export_contacts.view.* import java.io.File @@ -48,7 +49,7 @@ class ExportContactsDialog(val activity: SimpleActivity, val path: String, priva val selectedIndexes = (view.export_contacts_list.adapter as FilterContactSourcesAdapter).getSelectedItemsSet() val selectedContactSources = HashSet() selectedIndexes.forEach { - selectedContactSources.add(contactSources[it].name) + selectedContactSources.add(if (contactSources[it].type == SMT_PRIVATE) SMT_PRIVATE else contactSources[it].name) } callback(file, selectedContactSources) dismiss() diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/dialogs/ImportContactsDialog.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/dialogs/ImportContactsDialog.kt index 5c872afe..8f2ed22f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/dialogs/ImportContactsDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/dialogs/ImportContactsDialog.kt @@ -9,6 +9,7 @@ import com.simplemobiletools.contacts.activities.SimpleActivity import com.simplemobiletools.contacts.extensions.config import com.simplemobiletools.contacts.extensions.getPublicContactSource import com.simplemobiletools.contacts.extensions.showContactSourcePicker +import com.simplemobiletools.contacts.helpers.SMT_PRIVATE import com.simplemobiletools.contacts.helpers.VcfImporter import com.simplemobiletools.contacts.helpers.VcfImporter.ImportResult.IMPORT_FAIL import kotlinx.android.synthetic.main.dialog_import_contacts.view.* @@ -22,7 +23,7 @@ class ImportContactsDialog(val activity: SimpleActivity, val path: String, priva import_contacts_title.text = activity.getPublicContactSource(targetContactSource) import_contacts_title.setOnClickListener { activity.showContactSourcePicker(targetContactSource) { - targetContactSource = it + targetContactSource = if (it == activity.getString(R.string.phone_storage_hidden)) SMT_PRIVATE else it import_contacts_title.text = activity.getPublicContactSource(it) } }