This commit is contained in:
Horis
2023-07-21 13:54:51 +08:00
parent 2e945ca3e8
commit 1190f9032d

View File

@@ -39,7 +39,13 @@ object ImageProvider {
* filePath bitmap
*/
private const val M = 1024 * 1024
val cacheSize get() = AppConfig.bitmapCacheSize * M
val cacheSize: Int
get() {
if (AppConfig.bitmapCacheSize <= 0) {
AppConfig.bitmapCacheSize = 50
}
return AppConfig.bitmapCacheSize * M
}
var triggerRecycled = false
val bitmapLruCache = object : LruCache<String, Bitmap>(cacheSize) {