Add JavaScriptEngine abstraction to extensions-lib (#8155)
This allows us to swap out the implementation in the future and on different platforms
without major changes to the extensions themselves.
(cherry picked from commit 7be6863910)
# Conflicts:
# core/build.gradle.kts
This commit is contained in:
@@ -39,6 +39,7 @@ import eu.kanade.tachiyomi.data.saver.ImageSaver
|
||||
import eu.kanade.tachiyomi.data.track.TrackManager
|
||||
import eu.kanade.tachiyomi.data.track.job.DelayedTrackingStore
|
||||
import eu.kanade.tachiyomi.extension.ExtensionManager
|
||||
import eu.kanade.tachiyomi.network.JavaScriptEngine
|
||||
import eu.kanade.tachiyomi.network.NetworkHelper
|
||||
import eu.kanade.tachiyomi.network.NetworkPreferences
|
||||
import eu.kanade.tachiyomi.source.SourceManager
|
||||
@@ -87,7 +88,6 @@ class AppModule(val app: Application) : InjektModule {
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
addSingletonFactory {
|
||||
Database(
|
||||
driver = get(),
|
||||
@@ -108,7 +108,6 @@ class AppModule(val app: Application) : InjektModule {
|
||||
// SY <--
|
||||
)
|
||||
}
|
||||
|
||||
addSingletonFactory<DatabaseHandler> { AndroidDatabaseHandler(get(), get()) }
|
||||
|
||||
addSingletonFactory {
|
||||
@@ -117,7 +116,6 @@ class AppModule(val app: Application) : InjektModule {
|
||||
explicitNulls = false
|
||||
}
|
||||
}
|
||||
|
||||
addSingletonFactory {
|
||||
XML {
|
||||
unknownChildHandler = UnknownChildHandler { _, _, _, _, _ -> emptyList() }
|
||||
@@ -126,19 +124,17 @@ class AppModule(val app: Application) : InjektModule {
|
||||
}
|
||||
|
||||
addSingletonFactory { ChapterCache(app) }
|
||||
|
||||
addSingletonFactory { CoverCache(app) }
|
||||
|
||||
addSingletonFactory { NetworkHelper(app) }
|
||||
|
||||
addSingletonFactory { ExtensionManager(app) }
|
||||
addSingletonFactory { JavaScriptEngine(app) }
|
||||
|
||||
addSingletonFactory { SourceManager(app, get(), get()) }
|
||||
addSingletonFactory { ExtensionManager(app) }
|
||||
|
||||
addSingletonFactory { DownloadManager(app) }
|
||||
|
||||
addSingletonFactory { TrackManager(app) }
|
||||
|
||||
addSingletonFactory { DelayedTrackingStore(app) }
|
||||
|
||||
addSingletonFactory { ImageSaver(app) }
|
||||
|
||||
Reference in New Issue
Block a user