From 47c9e07857d966ebaf1b0ada83d5b7b4275c7389 Mon Sep 17 00:00:00 2001 From: tarsin Date: Sat, 18 Mar 2023 21:30:47 +0800 Subject: [PATCH] Allow larger read cache --- app/src/main/java/com/hippo/ehviewer/EhApplication.kt | 2 +- app/src/main/res/values/arrays.xml | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/hippo/ehviewer/EhApplication.kt b/app/src/main/java/com/hippo/ehviewer/EhApplication.kt index 9720f7c42..28e949f5e 100644 --- a/app/src/main/java/com/hippo/ehviewer/EhApplication.kt +++ b/app/src/main/java/com/hippo/ehviewer/EhApplication.kt @@ -258,7 +258,7 @@ class EhApplication : Application(), DefaultLifecycleObserver, ImageLoaderFactor val imageCache by lazy { DiskCache.Builder().apply { directory(application.cacheDir.toOkioPath() / "image_cache") - maxSizeBytes(Settings.readCacheSize.coerceIn(40, 1280).toLong() * 1024 * 1024) + maxSizeBytes(Settings.readCacheSize.coerceIn(320, 5120).toLong() * 1024 * 1024) }.build() } } diff --git a/app/src/main/res/values/arrays.xml b/app/src/main/res/values/arrays.xml index 179a5d0f3..c427ff977 100644 --- a/app/src/main/res/values/arrays.xml +++ b/app/src/main/res/values/arrays.xml @@ -148,12 +148,11 @@ - 40 - 80 - 160 320 640 1280 + 2560 + 5120