make sure shared contacts have all appropriate fields filled
This commit is contained in:
parent
aea1ef464f
commit
6cc148b816
1 changed files with 6 additions and 3 deletions
|
@ -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?) {
|
||||
|
|
Loading…
Reference in a new issue