[Android] Put the user defined equalizer presets on top

Nicolas Pomepuy git at videolan.org
Mon Jun 14 12:16:21 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Jun 14 13:19:30 2021 +0200| [2a52febb5c9367feab162009554e552cffcaeb19] | committer: Nicolas Pomepuy

Put the user defined equalizer presets on top

Fixes #621

> https://code.videolan.org/videolan/vlc-android/commit/2a52febb5c9367feab162009554e552cffcaeb19
---

 .../vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.kt   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/application/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.kt b/application/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.kt
index 386cc048f..29840623f 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/audio/EqualizerFragment.kt
@@ -150,11 +150,11 @@ class EqualizerFragment : VLCBottomSheetDialogFragment() {
         presetCount = allSets.size
         for ((key) in Settings.getInstance(requireActivity()).all) {
             if (key.startsWith("custom_equalizer_")) {
-                allSets.add(key.replace("custom_equalizer_", "").replace("_", " "))
+                allSets.add(0, key.replace("custom_equalizer_", "").replace("_", " "))
                 customCount++
             }
         }
-        allSets.add(newPresetName)
+        allSets.add(customCount, newPresetName)
 
         equalizer = VLCOptions.getEqualizerSetFromSettings(requireActivity(), true)!!
 



More information about the Android mailing list