From 40f630170c18dcabdc179c01b9b9380fefdb0b34 Mon Sep 17 00:00:00 2001 From: nwuensche Date: Sat, 18 May 2024 14:54:49 +0200 Subject: [PATCH] Update change of Code Digit Grouping --- .../fragments/preferences/AppearancePreferencesFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/beemdevelopment/aegis/ui/fragments/preferences/AppearancePreferencesFragment.java b/app/src/main/java/com/beemdevelopment/aegis/ui/fragments/preferences/AppearancePreferencesFragment.java index c8f324c7..8abdd841 100644 --- a/app/src/main/java/com/beemdevelopment/aegis/ui/fragments/preferences/AppearancePreferencesFragment.java +++ b/app/src/main/java/com/beemdevelopment/aegis/ui/fragments/preferences/AppearancePreferencesFragment.java @@ -132,9 +132,10 @@ public class AppearancePreferencesFragment extends PreferencesFragment { String[] codeGroupings = getResources().getStringArray(R.array.pref_code_groupings_values); String[] codeGroupingNames = getResources().getStringArray(R.array.pref_code_groupings); - int currentCodeGroupingIndex = Arrays.asList(codeGroupings).indexOf(_prefs.getCodeGroupSize().name()); Preference codeDigitGroupingPreference = requirePreference("pref_code_group_size_string"); codeDigitGroupingPreference.setOnPreferenceClickListener(preference -> { + int currentCodeGroupingIndex = Arrays.asList(codeGroupings).indexOf(_prefs.getCodeGroupSize().name()); + Dialogs.showSecureDialog(new MaterialAlertDialogBuilder(requireContext()) .setTitle(R.string.pref_code_group_size_title) .setSingleChoiceItems(codeGroupingNames, currentCodeGroupingIndex, (dialog, which) -> {