allow creating a brand new group at selecting target group

This commit is contained in:
tibbi 2018-03-20 21:30:31 +01:00
parent 5ee383af74
commit d583a457ff
1 changed files with 6 additions and 1 deletions

View File

@ -20,6 +20,7 @@ import com.simplemobiletools.commons.views.FastScroller
import com.simplemobiletools.commons.views.MyRecyclerView
import com.simplemobiletools.contacts.R
import com.simplemobiletools.contacts.activities.SimpleActivity
import com.simplemobiletools.contacts.dialogs.CreateNewGroupDialog
import com.simplemobiletools.contacts.extensions.config
import com.simplemobiletools.contacts.extensions.editContact
import com.simplemobiletools.contacts.extensions.shareContacts
@ -195,7 +196,11 @@ class ContactsAdapter(activity: SimpleActivity, var contactItems: ArrayList<Cont
RadioGroupDialog(activity, items, 0) {
if (it as Int == NEW_GROUP_ID) {
CreateNewGroupDialog(activity) {
ContactsHelper(activity).addContactsToGroup(selectedContacts, it.id)
refreshListener?.refreshContacts(GROUPS_TAB_MASK)
finishActMode()
}
} else {
ContactsHelper(activity).addContactsToGroup(selectedContacts, it.toLong())
refreshListener?.refreshContacts(GROUPS_TAB_MASK)