|
|
@ -105,7 +105,9 @@ class OtherConfigFragment : PreferenceFragment(), |
|
|
|
PreferKey.cleanCache -> clearCache() |
|
|
|
PreferKey.cleanCache -> clearCache() |
|
|
|
PreferKey.uploadRule -> showDialogFragment<DirectLinkUploadConfig>() |
|
|
|
PreferKey.uploadRule -> showDialogFragment<DirectLinkUploadConfig>() |
|
|
|
PreferKey.checkSource -> showDialogFragment<CheckSourceConfig>() |
|
|
|
PreferKey.checkSource -> showDialogFragment<CheckSourceConfig>() |
|
|
|
PreferKey.bitmapCacheSize -> NumberPickerDialog(requireContext()) |
|
|
|
PreferKey.bitmapCacheSize -> { |
|
|
|
|
|
|
|
toastOnUi(R.string.restart_to_apply_changes) |
|
|
|
|
|
|
|
NumberPickerDialog(requireContext()) |
|
|
|
.setTitle(getString(R.string.bitmap_cache_size)) |
|
|
|
.setTitle(getString(R.string.bitmap_cache_size)) |
|
|
|
.setMaxValue(9999) |
|
|
|
.setMaxValue(9999) |
|
|
|
.setMinValue(1) |
|
|
|
.setMinValue(1) |
|
|
@ -114,6 +116,7 @@ class OtherConfigFragment : PreferenceFragment(), |
|
|
|
AppConfig.bitmapCacheSize = it |
|
|
|
AppConfig.bitmapCacheSize = it |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
return super.onPreferenceTreeClick(preference) |
|
|
|
return super.onPreferenceTreeClick(preference) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -152,8 +155,6 @@ class OtherConfigFragment : PreferenceFragment(), |
|
|
|
} |
|
|
|
} |
|
|
|
PreferKey.bitmapCacheSize -> { |
|
|
|
PreferKey.bitmapCacheSize -> { |
|
|
|
upPreferenceSummary(key, AppConfig.bitmapCacheSize.toString()) |
|
|
|
upPreferenceSummary(key, AppConfig.bitmapCacheSize.toString()) |
|
|
|
// restart to apply changes |
|
|
|
|
|
|
|
appCtx.restart() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|