Skip to content
Snippets Groups Projects
Commit 0b5cfba1 authored by Robert Stone's avatar Robert Stone
Browse files

Re-order keys for consistency

parent 8f143728
No related branches found
No related tags found
1 merge request!1347Clarify replay gain preferences
......@@ -87,7 +87,7 @@ class PreferencesAudio : BasePreferenceFragment(), SharedPreferences.OnSharedPre
val f = super.buildPreferenceDialogFragment(preference)
if (f is CustomEditTextPreferenceDialogFragment) {
when (preference.key) {
"audio-replay-gain-preamp", "audio-replay-gain-default" -> {
"audio-replay-gain-default", "audio-replay-gain-preamp" -> {
f.setFilters(arrayOf(InputFilter.LengthFilter(6)))
f.setInputType(InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL or InputType.TYPE_NUMBER_FLAG_SIGNED)
}
......
......@@ -75,7 +75,7 @@ class PreferencesAudio : BasePreferenceFragment(), SharedPreferences.OnSharedPre
updatePassThroughSummary()
val opensles = "1" == preferenceManager.sharedPreferences.getString("aout", "0")
if (opensles) findPreference<Preference>("audio_digital_output")?.isVisible = false
for (key in arrayOf("audio-replay-gain-preamp", "audio-replay-gain-default")) {
for (key in arrayOf("audio-replay-gain-default", "audio-replay-gain-preamp")) {
findPreference<EditTextPreference>(key)?.setOnBindEditTextListener {
it.inputType = InputType.TYPE_CLASS_NUMBER or InputType.TYPE_NUMBER_FLAG_DECIMAL or InputType.TYPE_NUMBER_FLAG_SIGNED
it.filters = arrayOf<InputFilter>(InputFilter.LengthFilter(6))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment