Remove unneded dependency

This commit is contained in:
len
2016-04-06 20:40:37 +02:00
parent 1844b8c5a2
commit fa8d0946e9
7 changed files with 6 additions and 44 deletions

View File

@@ -10,11 +10,7 @@ import com.github.pwittchen.reactivenetwork.library.ReactiveNetwork
import eu.kanade.tachiyomi.App
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.event.DownloadChaptersEvent
import eu.kanade.tachiyomi.util.toast
import org.greenrobot.eventbus.EventBus
import org.greenrobot.eventbus.Subscribe
import org.greenrobot.eventbus.ThreadMode
import rx.Subscription
import rx.android.schedulers.AndroidSchedulers
import rx.schedulers.Schedulers
@@ -48,7 +44,6 @@ class DownloadService : Service() {
createWakeLock()
listenQueueRunningChanges()
EventBus.getDefault().register(this)
listenNetworkChanges()
}
@@ -57,7 +52,6 @@ class DownloadService : Service() {
}
override fun onDestroy() {
EventBus.getDefault().unregister(this)
queueRunningSubscription?.unsubscribe()
networkChangeSubscription?.unsubscribe()
downloadManager.destroySubscriptions()
@@ -69,12 +63,6 @@ class DownloadService : Service() {
return null
}
@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
fun onEvent(event: DownloadChaptersEvent) {
EventBus.getDefault().removeStickyEvent(event)
downloadManager.onDownloadChaptersEvent(event)
}
private fun listenNetworkChanges() {
networkChangeSubscription = ReactiveNetwork().enableInternetCheck()
.observeConnectivity(applicationContext)