From 2dc0ce066d44196e91e27db47e496b870e21b0dd Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Wed, 16 Aug 2023 18:18:38 +0200 Subject: [PATCH] Fix inconsistent initial spacing between keys Settings defined with `get_dip_pref` had a wrong default value on first launch. The "right" default value was used after the shared preferences are populated. --- srcs/juloo.keyboard2/Config.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcs/juloo.keyboard2/Config.java b/srcs/juloo.keyboard2/Config.java index fdc7730..05a7632 100644 --- a/srcs/juloo.keyboard2/Config.java +++ b/srcs/juloo.keyboard2/Config.java @@ -295,7 +295,7 @@ final class Config try { value = _prefs.getInt(pref_name, -1); } catch (Exception e) { value = _prefs.getFloat(pref_name, -1f); } if (value < 0f) - return (def); + value = def; return (TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, value, dm)); }