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
1 changed files with 6 additions and 3 deletions

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?) {