Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
821938089 committed Jul 21, 2023
1 parent 2e945ca commit 1190f90
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/src/main/java/io/legado/app/model/ImageProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Expand Down

0 comments on commit 1190f90

Please sign in to comment.