mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-22 13:48:52 +01:00
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