Added option to use the identity color for the bottom action bar

This commit is contained in:
M66B
2023-07-05 12:08:24 +02:00
parent a98a855f50
commit 33382a6579
4 changed files with 35 additions and 4 deletions

View File

@@ -72,6 +72,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
private SwitchCompat swAutoIdentity;
private Button btnLocalContacts;
private SwitchCompat swSendChips;
private SwitchCompat swNavColor;
private SwitchCompat swSendReminders;
private SwitchCompat swSendPending;
private SwitchCompat swAutoSaveParagraph;
@@ -121,7 +122,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
private final static String[] RESET_OPTIONS = new String[]{
"keyboard", "keyboard_no_fullscreen",
"suggest_names", "suggest_sent", "suggested_received", "suggest_frequently", "auto_identity",
"send_reminders", "send_chips", "send_pending",
"send_reminders", "send_chips", "send_nav_color", "send_pending",
"auto_save_paragraph", "auto_save_dot", "discard_delete",
"send_delayed",
"answer_single", "answer_action",
@@ -158,6 +159,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
swAutoIdentity = view.findViewById(R.id.swAutoIdentity);
btnLocalContacts = view.findViewById(R.id.btnLocalContacts);
swSendChips = view.findViewById(R.id.swSendChips);
swNavColor = view.findViewById(R.id.swNavColor);
swSendReminders = view.findViewById(R.id.swSendReminders);
swSendPending = view.findViewById(R.id.swSendPending);
swAutoSaveParagraph = view.findViewById(R.id.swAutoSaveParagraph);
@@ -302,6 +304,13 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
}
});
swNavColor.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("send_nav_color", checked).apply();
}
});
swSendReminders.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@@ -748,6 +757,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
swAutoIdentity.setChecked(prefs.getBoolean("auto_identity", false));
swAutoIdentity.setEnabled(swSuggestSent.isChecked() || swSuggestReceived.isChecked());
swSendChips.setChecked(prefs.getBoolean("send_chips", true));
swNavColor.setChecked(prefs.getBoolean("send_nav_color", false));
swSendReminders.setChecked(prefs.getBoolean("send_reminders", true));
swSendPending.setChecked(prefs.getBoolean("send_pending", true));
swAutoSaveParagraph.setChecked(prefs.getBoolean("auto_save_paragraph", true));