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