SimpleMobileTools / Simple-Contacts

Easy and quick contact management with no ads, handles groups and favorites too.
https://www.simplemobiletools.com
GNU General Public License v3.0
804 stars 260 forks source link

"Delete contacts" not working properly if the contact is saved multiple times with the same name - [SOLVED] #1033

Closed SweetD3v closed 1 year ago

SweetD3v commented 1 year ago

There was an issue where if you delete the contact it seems like it doesn't get deleted and keeps apearing until you delete the last contact.

But, it's an illusion!

The reason is, if you fetch all contacts with the 'getAll' parameter true in the method, then it will not get the contacts with the same name again. So, to overcome the delete bug, you'll have to make it 'true' so you'll get proper contactId and all of the selected contacts will get deleted properly. If you don't want it that way then, you'll have to apply the duplicate contact deletion logic yourself.

Here is the method where you'll have to pass 'true',

ContactsHelper(this).getContacts(getAll = true) { contacts ->
}