Sync messages after restore

This commit is contained in:
Moez Bhatti
2018-08-30 16:19:14 -04:00
parent baecdd9348
commit 680c8eb445
@@ -44,7 +44,8 @@ import javax.inject.Singleton
@Singleton
class BackupRepositoryImpl @Inject constructor(
private val context: Context,
private val moshi: Moshi
private val moshi: Moshi,
private val syncRepo: SyncRepository
) : BackupRepository {
companion object {
@@ -197,6 +198,10 @@ class BackupRepositoryImpl @Inject constructor(
Telephony.Sms.SUBSCRIPTION_ID to message.subId))
}
restoreProgress.onNext(BackupRepository.Progress.Running(0, "Syncing messages"))
syncRepo.syncMessages()
restoreProgress.onNext(BackupRepository.Progress.Idle())
}