mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Remove unneded dependency
This commit is contained in:
parent
1844b8c5a2
commit
fa8d0946e9
7 changed files with 6 additions and 44 deletions
|
@ -130,8 +130,6 @@ dependencies {
|
||||||
compile 'com.nononsenseapps:filepicker:2.5.2'
|
compile 'com.nononsenseapps:filepicker:2.5.2'
|
||||||
compile 'com.github.amulyakhare:TextDrawable:558677e'
|
compile 'com.github.amulyakhare:TextDrawable:558677e'
|
||||||
|
|
||||||
compile "org.greenrobot:eventbus:3.0.0"
|
|
||||||
|
|
||||||
compile "com.google.dagger:dagger:$DAGGER_VERSION"
|
compile "com.google.dagger:dagger:$DAGGER_VERSION"
|
||||||
kapt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
|
kapt "com.google.dagger:dagger-compiler:$DAGGER_VERSION"
|
||||||
kapt "com.pushtorefresh.storio:sqlite-annotations-processor:$STORIO_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>(...);
|
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 #
|
# Glide specific rules #
|
||||||
# https://github.com/bumptech/glide
|
# https://github.com/bumptech/glide
|
||||||
-keep public class * implements com.bumptech.glide.module.GlideModule
|
-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 eu.kanade.tachiyomi.injection.module.AppModule
|
||||||
import org.acra.ACRA
|
import org.acra.ACRA
|
||||||
import org.acra.annotation.ReportsCrashes
|
import org.acra.annotation.ReportsCrashes
|
||||||
import org.greenrobot.eventbus.EventBus
|
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
|
||||||
@ReportsCrashes(
|
@ReportsCrashes(
|
||||||
|
@ -38,7 +37,6 @@ open class App : Application() {
|
||||||
componentReflection = ComponentReflectionInjector(AppComponent::class.java, component)
|
componentReflection = ComponentReflectionInjector(AppComponent::class.java, component)
|
||||||
|
|
||||||
setupTheme()
|
setupTheme()
|
||||||
setupEventBus()
|
|
||||||
setupAcra()
|
setupAcra()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -51,12 +49,6 @@ open class App : Application() {
|
||||||
.appModule(AppModule(this))
|
.appModule(AppModule(this))
|
||||||
}
|
}
|
||||||
|
|
||||||
protected open fun setupEventBus() {
|
|
||||||
EventBus.builder()
|
|
||||||
.logNoSubscriberMessages(false)
|
|
||||||
.installDefaultEventBus()
|
|
||||||
}
|
|
||||||
|
|
||||||
protected open fun setupAcra() {
|
protected open fun setupAcra() {
|
||||||
ACRA.init(this)
|
ACRA.init(this)
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,11 +10,7 @@ import com.github.pwittchen.reactivenetwork.library.ReactiveNetwork
|
||||||
import eu.kanade.tachiyomi.App
|
import eu.kanade.tachiyomi.App
|
||||||
import eu.kanade.tachiyomi.R
|
import eu.kanade.tachiyomi.R
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||||
import eu.kanade.tachiyomi.event.DownloadChaptersEvent
|
|
||||||
import eu.kanade.tachiyomi.util.toast
|
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.Subscription
|
||||||
import rx.android.schedulers.AndroidSchedulers
|
import rx.android.schedulers.AndroidSchedulers
|
||||||
import rx.schedulers.Schedulers
|
import rx.schedulers.Schedulers
|
||||||
|
@ -48,7 +44,6 @@ class DownloadService : Service() {
|
||||||
createWakeLock()
|
createWakeLock()
|
||||||
|
|
||||||
listenQueueRunningChanges()
|
listenQueueRunningChanges()
|
||||||
EventBus.getDefault().register(this)
|
|
||||||
listenNetworkChanges()
|
listenNetworkChanges()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +52,6 @@ class DownloadService : Service() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDestroy() {
|
override fun onDestroy() {
|
||||||
EventBus.getDefault().unregister(this)
|
|
||||||
queueRunningSubscription?.unsubscribe()
|
queueRunningSubscription?.unsubscribe()
|
||||||
networkChangeSubscription?.unsubscribe()
|
networkChangeSubscription?.unsubscribe()
|
||||||
downloadManager.destroySubscriptions()
|
downloadManager.destroySubscriptions()
|
||||||
|
@ -69,12 +63,6 @@ class DownloadService : Service() {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe(sticky = true, threadMode = ThreadMode.MAIN)
|
|
||||||
fun onEvent(event: DownloadChaptersEvent) {
|
|
||||||
EventBus.getDefault().removeStickyEvent(event)
|
|
||||||
downloadManager.onDownloadChaptersEvent(event)
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun listenNetworkChanges() {
|
private fun listenNetworkChanges() {
|
||||||
networkChangeSubscription = ReactiveNetwork().enableInternetCheck()
|
networkChangeSubscription = ReactiveNetwork().enableInternetCheck()
|
||||||
.observeConnectivity(applicationContext)
|
.observeConnectivity(applicationContext)
|
||||||
|
|
|
@ -16,7 +16,6 @@ import eu.kanade.tachiyomi.event.MangaEvent
|
||||||
import eu.kanade.tachiyomi.event.ReaderEvent
|
import eu.kanade.tachiyomi.event.ReaderEvent
|
||||||
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
||||||
import eu.kanade.tachiyomi.util.SharedData
|
import eu.kanade.tachiyomi.util.SharedData
|
||||||
import org.greenrobot.eventbus.EventBus
|
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import rx.android.schedulers.AndroidSchedulers
|
import rx.android.schedulers.AndroidSchedulers
|
||||||
import rx.schedulers.Schedulers
|
import rx.schedulers.Schedulers
|
||||||
|
@ -198,7 +197,8 @@ class ChaptersPresenter : BasePresenter<ChaptersFragment>() {
|
||||||
|
|
||||||
fun downloadChapters(selectedChapters: Observable<Chapter>) {
|
fun downloadChapters(selectedChapters: Observable<Chapter>) {
|
||||||
add(selectedChapters.toList()
|
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>) {
|
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.event.ReaderEvent
|
||||||
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
||||||
import eu.kanade.tachiyomi.util.SharedData
|
import eu.kanade.tachiyomi.util.SharedData
|
||||||
import org.greenrobot.eventbus.EventBus
|
|
||||||
import rx.Observable
|
import rx.Observable
|
||||||
import rx.android.schedulers.AndroidSchedulers
|
import rx.android.schedulers.AndroidSchedulers
|
||||||
import rx.schedulers.Schedulers
|
import rx.schedulers.Schedulers
|
||||||
|
@ -267,7 +266,9 @@ class RecentChaptersPresenter : BasePresenter<RecentChaptersFragment>() {
|
||||||
* @param manga manga that belongs to chapter
|
* @param manga manga that belongs to chapter
|
||||||
*/
|
*/
|
||||||
fun downloadChapter(selectedChapter: Observable<Chapter>, manga: Manga) {
|
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
|
add(selectedChapters
|
||||||
.subscribe(
|
.subscribe(
|
||||||
{ chapter -> downloadManager.queue.del(chapter) })
|
{ 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())
|
.dataModule(TestDataModule())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun setupEventBus() {
|
|
||||||
// Do nothing
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setupAcra() {
|
override fun setupAcra() {
|
||||||
// Do nothing
|
// Do nothing
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue