mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
adding a couple checks of contacts permissions
This commit is contained in:
@ -126,7 +126,7 @@ fun BaseSimpleActivity.addContactsToGroup(contacts: ArrayList<Contact>, groupId:
|
||||
fun BaseSimpleActivity.removeContactsFromGroup(contacts: ArrayList<Contact>, groupId: Long) {
|
||||
val publicContacts = contacts.filter { it.source != SMT_PRIVATE }
|
||||
val privateContacts = contacts.filter { it.source == SMT_PRIVATE }
|
||||
if (publicContacts.isNotEmpty()) {
|
||||
if (publicContacts.isNotEmpty() && hasContactPermissions()) {
|
||||
ContactsHelper(this).removeContactsFromGroup(contacts, groupId)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user