优化 #5730
This commit is contained in:
@@ -41,7 +41,7 @@ object ImageProvider {
|
||||
private const val M = 1024 * 1024
|
||||
val cacheSize: Int
|
||||
get() {
|
||||
if (AppConfig.bitmapCacheSize <= 0 || AppConfig.bitmapCacheSize >= 2048) {
|
||||
if (AppConfig.bitmapCacheSize !in 1..1024) {
|
||||
AppConfig.bitmapCacheSize = 50
|
||||
}
|
||||
return AppConfig.bitmapCacheSize * M
|
||||
|
||||
@@ -126,7 +126,7 @@ class OtherConfigFragment : PreferenceFragment(),
|
||||
PreferKey.bitmapCacheSize -> {
|
||||
NumberPickerDialog(requireContext())
|
||||
.setTitle(getString(R.string.bitmap_cache_size))
|
||||
.setMaxValue(2047)
|
||||
.setMaxValue(1024)
|
||||
.setMinValue(1)
|
||||
.setValue(AppConfig.bitmapCacheSize)
|
||||
.show {
|
||||
|
||||
Reference in New Issue
Block a user