From c6908ec846875907786393656d3a92e46e27b994 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 18 Jan 2025 11:34:08 +0100 Subject: [PATCH] Stable ordering or extra keys Extra keys were ordered randomly everytime the settings were changed. Now, there's a single ordering for each combinations of options in the settings. --- srcs/juloo.keyboard2/LayoutModifier.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/srcs/juloo.keyboard2/LayoutModifier.java b/srcs/juloo.keyboard2/LayoutModifier.java index 7220634..f37be25 100644 --- a/srcs/juloo.keyboard2/LayoutModifier.java +++ b/srcs/juloo.keyboard2/LayoutModifier.java @@ -2,7 +2,7 @@ package juloo.keyboard2; import android.content.res.Resources; import android.view.KeyEvent; -import java.util.HashMap; +import java.util.TreeMap; import java.util.HashSet; import java.util.Map; import java.util.Set; @@ -26,7 +26,7 @@ public final class LayoutModifier { // Extra keys are removed from the set as they are encountered during the // first iteration then automatically added. - final Map extra_keys = new HashMap(); + final TreeMap extra_keys = new TreeMap(); final Set remove_keys = new HashSet(); // Make sure the config key is accessible to avoid being locked in a custom // layout.