mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 07:19:18 +01:00
Pass library preferences to chapter cache via DI
This commit is contained in:
parent
9b35f31afa
commit
62b7333993
@ -31,10 +31,9 @@ import java.io.IOException
|
||||
class ChapterCache(
|
||||
private val context: Context,
|
||||
private val json: Json,
|
||||
var libraryPreferences: LibraryPreferences,
|
||||
) {
|
||||
|
||||
val libraryPreferences = Injekt.get<LibraryPreferences>()
|
||||
|
||||
/** Cache class used for cache management. */
|
||||
private val diskCache = DiskLruCache.open(
|
||||
File(context.cacheDir, "chapter_disk_cache"),
|
||||
|
@ -114,7 +114,7 @@ class AppModule(val app: Application) : InjektModule {
|
||||
|
||||
addSingletonFactory { UniFileTempFileManager(app) }
|
||||
|
||||
addSingletonFactory { ChapterCache(app, get()) }
|
||||
addSingletonFactory { ChapterCache(app, get(), get()) }
|
||||
addSingletonFactory { CoverCache(app) }
|
||||
|
||||
addSingletonFactory { NetworkHelper(app, get()) }
|
||||
|
Loading…
Reference in New Issue
Block a user