Avoid duplicate contacts, update recipient contact on sync

This commit is contained in:
Moez Bhatti
2018-01-16 18:51:54 -05:00
parent 8ecf8c1d33
commit 5f7ad625cd
8 changed files with 59 additions and 84 deletions
@@ -33,7 +33,7 @@ open class PartialSync @Inject constructor(
override fun buildObservable(params: Unit): Flowable<Long> {
return Flowable.just(System.currentTimeMillis())
.skipWhile { !permissions.hasSmsAndContacts() }
.doOnNext { syncManager.performSync() }
.doOnNext { syncManager.syncMessages() }
.map { startTime -> System.currentTimeMillis() - startTime }
.map { elapsed -> TimeUnit.MILLISECONDS.toSeconds(elapsed) }
.doOnNext { seconds -> Timber.v("Completed sync in $seconds seconds") }