diff --git a/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt b/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt index 114f231b6..4c0621a1a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/AppModule.kt @@ -11,8 +11,8 @@ import eu.kanade.tachiyomi.data.track.TrackManager import eu.kanade.tachiyomi.extension.ExtensionManager import eu.kanade.tachiyomi.network.NetworkHelper import eu.kanade.tachiyomi.source.SourceManager -import rx.Observable -import rx.schedulers.Schedulers +import kotlinx.coroutines.GlobalScope +import kotlinx.coroutines.launch import uy.kohesive.injekt.api.* class AppModule(val app: Application) : InjektModule { @@ -43,20 +43,16 @@ class AppModule(val app: Application) : InjektModule { // Asynchronously init expensive components for a faster cold start - rxAsync { get() } + GlobalScope.launch { get() } - rxAsync { get() } + GlobalScope.launch { get() } - rxAsync { get() } + GlobalScope.launch { get() } - rxAsync { get() } + GlobalScope.launch { get() } - rxAsync { get() } + GlobalScope.launch { get() } } - private fun rxAsync(block: () -> Unit) { - Observable.fromCallable { block() }.subscribeOn(Schedulers.computation()).subscribe() - } - }