Guard against duplicate phone numbers

This commit is contained in:
moezbhatti
2019-11-12 23:50:44 -05:00
committed by Moez Bhatti
parent 29068f52c9
commit af2e550ea4
@@ -162,7 +162,7 @@ class SyncRepositoryImpl @Inject constructor(
// Sync recipients
recipientCursor?.use {
val contacts = realm.copyToRealm(getContacts())
val contacts = realm.copyToRealmOrUpdate(getContacts())
val recipients = recipientCursor.map { cursor ->
progress++
syncProgress.onNext(SyncRepository.SyncProgress.Running(max, progress, false))