mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-06 18:57:26 +01:00
Remove unneded dependency
This commit is contained in:
parent
1844b8c5a2
commit
fa8d0946e9
@ -130,8 +130,6 @@ dependencies {
|
||||
compile 'com.nononsenseapps:filepicker:2.5.2'
|
||||
compile 'com.github.amulyakhare:TextDrawable:558677e'
|
||||
|
||||
compile "org.greenrobot:eventbus:3.0.0"
|
||||
|
||||
compile "com.google.dagger:dagger:$DAGGER_VERSION"
|
||||
kapt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
|
||||
kapt "com.pushtorefresh.storio:sqlite-annotations-processor:$STORIO_VERSION"
|
||||
|
13
app/proguard-rules.pro
vendored
13
app/proguard-rules.pro
vendored
@ -38,19 +38,6 @@
|
||||
public <init>(...);
|
||||
}
|
||||
|
||||
## GreenRobot EventBus specific rules ##
|
||||
# http://greenrobot.org/eventbus/documentation/proguard/
|
||||
-keepattributes *Annotation*
|
||||
-keepclassmembers class ** {
|
||||
@org.greenrobot.eventbus.Subscribe <methods>;
|
||||
}
|
||||
-keep enum org.greenrobot.eventbus.ThreadMode { *; }
|
||||
|
||||
# Only required if you use AsyncExecutor
|
||||
-keepclassmembers class * extends org.greenrobot.eventbus.util.ThrowableFailureEvent {
|
||||
<init>(java.lang.Throwable);
|
||||
}
|
||||
|
||||
# Glide specific rules #
|
||||
# https://github.com/bumptech/glide
|
||||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
||||
|
@ -9,7 +9,6 @@ import eu.kanade.tachiyomi.injection.component.DaggerAppComponent
|
||||
import eu.kanade.tachiyomi.injection.module.AppModule
|
||||
import org.acra.ACRA
|
||||
import org.acra.annotation.ReportsCrashes
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import timber.log.Timber
|
||||
|
||||
@ReportsCrashes(
|
||||
@ -38,7 +37,6 @@ open class App : Application() {
|
||||
componentReflection = ComponentReflectionInjector(AppComponent::class.java, component)
|
||||
|
||||
setupTheme()
|
||||
setupEventBus()
|
||||
setupAcra()
|
||||
}
|
||||
|
||||
@ -51,12 +49,6 @@ open class App : Application() {
|
||||
.appModule(AppModule(this))
|
||||
}
|
||||
|
||||
protected open fun setupEventBus() {
|
||||
EventBus.builder()
|
||||
.logNoSubscriberMessages(false)
|
||||
.installDefaultEventBus()
|
||||
}
|
||||
|
||||
protected open fun setupAcra() {
|
||||
ACRA.init(this)
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -16,7 +16,6 @@ import eu.kanade.tachiyomi.event.MangaEvent
|
||||
import eu.kanade.tachiyomi.event.ReaderEvent
|
||||
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
||||
import eu.kanade.tachiyomi.util.SharedData
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import rx.Observable
|
||||
import rx.android.schedulers.AndroidSchedulers
|
||||
import rx.schedulers.Schedulers
|
||||
@ -198,7 +197,8 @@ class ChaptersPresenter : BasePresenter<ChaptersFragment>() {
|
||||
|
||||
fun downloadChapters(selectedChapters: Observable<Chapter>) {
|
||||
add(selectedChapters.toList()
|
||||
.subscribe { chapters -> EventBus.getDefault().postSticky(DownloadChaptersEvent(manga, chapters)) })
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe { downloadManager.onDownloadChaptersEvent(DownloadChaptersEvent(manga, it)) })
|
||||
}
|
||||
|
||||
fun deleteChapters(selectedChapters: Observable<Chapter>) {
|
||||
|
@ -13,7 +13,6 @@ import eu.kanade.tachiyomi.event.DownloadChaptersEvent
|
||||
import eu.kanade.tachiyomi.event.ReaderEvent
|
||||
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
||||
import eu.kanade.tachiyomi.util.SharedData
|
||||
import org.greenrobot.eventbus.EventBus
|
||||
import rx.Observable
|
||||
import rx.android.schedulers.AndroidSchedulers
|
||||
import rx.schedulers.Schedulers
|
||||
@ -267,7 +266,9 @@ class RecentChaptersPresenter : BasePresenter<RecentChaptersFragment>() {
|
||||
* @param manga manga that belongs to chapter
|
||||
*/
|
||||
fun downloadChapter(selectedChapter: Observable<Chapter>, manga: Manga) {
|
||||
add(selectedChapter.toList().subscribe { chapters -> EventBus.getDefault().postSticky(DownloadChaptersEvent(manga, chapters)) })
|
||||
add(selectedChapter.toList()
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe { downloadManager.onDownloadChaptersEvent(DownloadChaptersEvent(manga, it)) })
|
||||
}
|
||||
|
||||
/**
|
||||
@ -289,7 +290,7 @@ class RecentChaptersPresenter : BasePresenter<RecentChaptersFragment>() {
|
||||
add(selectedChapters
|
||||
.subscribe(
|
||||
{ chapter -> downloadManager.queue.del(chapter) })
|
||||
{ error -> Timber.e(error.message) })
|
||||
{ error -> Timber.e(error.message) })
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -12,10 +12,6 @@ open class TestApp : App() {
|
||||
.dataModule(TestDataModule())
|
||||
}
|
||||
|
||||
override fun setupEventBus() {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
override fun setupAcra() {
|
||||
// Do nothing
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user