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:
@ -1024,12 +1024,16 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
|
||||
|
||||
fun addFavorites(contacts: ArrayList<Contact>) {
|
||||
toggleLocalFavorites(contacts, true)
|
||||
toggleFavorites(contacts, true)
|
||||
if (activity.hasContactPermissions()) {
|
||||
toggleFavorites(contacts, true)
|
||||
}
|
||||
}
|
||||
|
||||
fun removeFavorites(contacts: ArrayList<Contact>) {
|
||||
toggleLocalFavorites(contacts, false)
|
||||
toggleFavorites(contacts, false)
|
||||
if (activity.hasContactPermissions()) {
|
||||
toggleFavorites(contacts, false)
|
||||
}
|
||||
}
|
||||
|
||||
private fun toggleFavorites(contacts: ArrayList<Contact>, addToFavorites: Boolean) {
|
||||
|
Reference in New Issue
Block a user