|
|
@ -31,10 +31,9 @@ import java.io.IOException
|
|
|
|
class ChapterCache(
|
|
|
|
class ChapterCache(
|
|
|
|
private val context: Context,
|
|
|
|
private val context: Context,
|
|
|
|
private val json: Json,
|
|
|
|
private val json: Json,
|
|
|
|
|
|
|
|
var libraryPreferences: LibraryPreferences,
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
|
|
|
|
|
|
|
|
val libraryPreferences = Injekt.get<LibraryPreferences>()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** Cache class used for cache management. */
|
|
|
|
/** Cache class used for cache management. */
|
|
|
|
private val diskCache = DiskLruCache.open(
|
|
|
|
private val diskCache = DiskLruCache.open(
|
|
|
|
File(context.cacheDir, "chapter_disk_cache"),
|
|
|
|
File(context.cacheDir, "chapter_disk_cache"),
|
|
|
|