Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit af2e550e authored by moezbhatti's avatar moezbhatti Committed by Moez Bhatti
Browse files

Guard against duplicate phone numbers

parent 29068f52
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -162,7 +162,7 @@ class SyncRepositoryImpl @Inject constructor(


        // Sync recipients
        // Sync recipients
        recipientCursor?.use {
        recipientCursor?.use {
            val contacts = realm.copyToRealm(getContacts())
            val contacts = realm.copyToRealmOrUpdate(getContacts())
            val recipients = recipientCursor.map { cursor ->
            val recipients = recipientCursor.map { cursor ->
                progress++
                progress++
                syncProgress.onNext(SyncRepository.SyncProgress.Running(max, progress, false))
                syncProgress.onNext(SyncRepository.SyncProgress.Running(max, progress, false))