From d06498eaa0f9f224bae4a681a0a1af0435be2808 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sun, 15 Sep 2019 10:22:15 +0200 Subject: [PATCH] delete contacts from a background thread --- .../contacts/pro/helpers/ContactsHelper.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt index 8f4ed32e..cf179b81 100644 --- a/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt +++ b/app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt @@ -1528,8 +1528,10 @@ class ContactsHelper(val context: Context) { ensureBackgroundThread { if (deleteClones) { getDuplicatesOfContact(originalContact, true) { contacts -> - if (deleteContacts(contacts)) { - callback(true) + ensureBackgroundThread { + if (deleteContacts(contacts)) { + callback(true) + } } } } else {