Skip to content

Commit 67a91aa

Browse files
committed
avoid overwriting contacts at fetching
1 parent 409add1 commit 67a91aa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/kotlin/com/simplemobiletools/contacts/pro/helpers/ContactsHelper.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ class ContactsHelper(val context: Context) {
178178
val contact = Contact(id, prefix, firstName, middleName, surname, suffix, nickname, photoUri, numbers, emails, addresses,
179179
events, accountName, starred, contactId, thumbnailUri, null, notes, groups, organization, websites, ims)
180180

181-
contacts.put(id, contact)
181+
if (contacts[id] == null) {
182+
contacts.put(id, contact)
183+
}
182184
}
183185

184186
val phoneNumbers = getPhoneNumbers(null)

0 commit comments

Comments
 (0)