Fix crash when trying to update contact that exists

This commit is contained in:
Moez Bhatti
2018-09-04 21:36:04 -04:00
parent 6d461baa21
commit 9b26e7306e
@@ -251,7 +251,7 @@ class SyncRepositoryImpl @Inject constructor(
val recipients = realm.where(Recipient::class.java).findAll()
realm.executeTransaction {
contact = realm.copyToRealm(contact)
contact = realm.copyToRealmOrUpdate(contact)
// Update all the matching recipients with the new contact
val updatedRecipients = recipients