make sure shared contacts have all appropriate fields filled

This commit is contained in:
tibbi 2018-02-22 18:37:15 +01:00
parent aea1ef464f
commit 6cc148b816

View file

@ -163,12 +163,15 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
}
private fun shareContacts() {
val contacts = ArrayList<Contact>()
val contactsIDs = ArrayList<Int>()
selectedPositions.forEach {
contacts.add(contactItems[it])
contactsIDs.add(contactItems[it].id)
}
activity.shareContacts(contacts)
ContactsHelper(activity).getContacts(true) {
val filtered = it.filter { contactsIDs.contains(it.id) } as ArrayList<Contact>
activity.shareContacts(filtered)
}
}
override fun onViewRecycled(holder: ViewHolder?) {