From 67a91aa62e327e2ee767358d208edf5025ed56ec Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 16 Jun 2020 22:55:27 +0200 Subject: [PATCH] avoid overwriting contacts at fetching --- .../simplemobiletools/contacts/pro/helpers/ContactsHelper.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 f0b2ae1a..41afcf3d 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 @@ -178,7 +178,9 @@ class ContactsHelper(val context: Context) { val contact = Contact(id, prefix, firstName, middleName, surname, suffix, nickname, photoUri, numbers, emails, addresses, events, accountName, starred, contactId, thumbnailUri, null, notes, groups, organization, websites, ims) - contacts.put(id, contact) + if (contacts[id] == null) { + contacts.put(id, contact) + } } val phoneNumbers = getPhoneNumbers(null)