forked from upstream-mirrors/quik
Fix crash when trying to update contact that exists
This commit is contained in:
@@ -251,7 +251,7 @@ class SyncRepositoryImpl @Inject constructor(
|
|||||||
val recipients = realm.where(Recipient::class.java).findAll()
|
val recipients = realm.where(Recipient::class.java).findAll()
|
||||||
|
|
||||||
realm.executeTransaction {
|
realm.executeTransaction {
|
||||||
contact = realm.copyToRealm(contact)
|
contact = realm.copyToRealmOrUpdate(contact)
|
||||||
|
|
||||||
// Update all the matching recipients with the new contact
|
// Update all the matching recipients with the new contact
|
||||||
val updatedRecipients = recipients
|
val updatedRecipients = recipients
|
||||||
|
|||||||
Reference in New Issue
Block a user