Refactor name of Sync interactor

This commit is contained in:
Moez Bhatti
2017-11-01 16:58:20 -07:00
parent ac7d08042d
commit 36ec292f74
2 changed files with 5 additions and 5 deletions
@@ -9,7 +9,7 @@ import io.reactivex.Flowable
import io.realm.Realm
import javax.inject.Inject
class SyncConversations @Inject constructor(
class FullSync @Inject constructor(
private val context: Context,
private val cursorToConversationFlowable: CursorToConversationFlowable,
private val cursorToMessageFlowable: CursorToMessageFlowable) : Interactor<Long, Unit>() {
@@ -4,7 +4,7 @@ import android.content.Context
import android.content.Intent
import android.provider.Telephony
import com.moez.QKSMS.common.di.AppComponentManager
import com.moez.QKSMS.domain.interactor.SyncConversations
import com.moez.QKSMS.domain.interactor.FullSync
import com.moez.QKSMS.presentation.base.QkViewModel
import io.reactivex.rxkotlin.plusAssign
import timber.log.Timber
@@ -13,12 +13,12 @@ import javax.inject.Inject
class SettingsViewModel : QkViewModel<SettingsView, SettingsState>(SettingsState()) {
@Inject lateinit var context: Context
@Inject lateinit var syncConversations: SyncConversations
@Inject lateinit var fullSync: FullSync
init {
AppComponentManager.appComponent.inject(this)
disposables += syncConversations.disposables
disposables += fullSync.disposables
}
override fun bindIntents(view: SettingsView) {
@@ -38,7 +38,7 @@ class SettingsViewModel : QkViewModel<SettingsView, SettingsState>(SettingsState
"sync" -> {
newState { it.copy(syncing = true) }
syncConversations.execute(Unit, {
fullSync.execute(Unit, {
newState { it.copy(syncing = false) }
})
}