Skip to content

Commit

Permalink
Fix inconsistent initial spacing between keys
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Julow committed Aug 16, 2023
1 parent ab05d83 commit 2dc0ce0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion srcs/juloo.keyboard2/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ private float get_dip_pref(DisplayMetrics dm, String pref_name, float def)
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));
}

Expand Down

0 comments on commit 2dc0ce0

Please sign in to comment.