mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-29 21:34:44 +02:00
Added option to enable grouping by account category
This commit is contained in:
@@ -64,6 +64,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
private SwitchCompat swTabularBackground;
|
||||
private SwitchCompat swShadow;
|
||||
private SwitchCompat swShadowHighlight;
|
||||
private SwitchCompat swCategory;
|
||||
private SwitchCompat swDate;
|
||||
private SwitchCompat swDateFixed;
|
||||
private SwitchCompat swDateBold;
|
||||
@@ -166,7 +167,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"theme", "startup", "cards", "beige", "tabular_card_bg", "shadow_unread", "shadow_highlight",
|
||||
"date", "date_fixed", "date_bold",
|
||||
"group_category", "date", "date_fixed", "date_bold",
|
||||
"portrait2", "portrait2c", "landscape", "close_pane",
|
||||
"nav_options", "nav_count", "nav_unseen_drafts", "navbar_colorize",
|
||||
"threading", "threading_unread", "indentation", "seekbar", "actionbar", "actionbar_color",
|
||||
@@ -202,6 +203,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swTabularBackground = view.findViewById(R.id.swTabularCardBackground);
|
||||
swShadow = view.findViewById(R.id.swShadow);
|
||||
swShadowHighlight = view.findViewById(R.id.swShadowHighlight);
|
||||
swCategory = view.findViewById(R.id.swCategory);
|
||||
swDate = view.findViewById(R.id.swDate);
|
||||
swDateFixed = view.findViewById(R.id.swDateFixed);
|
||||
swDateBold = view.findViewById(R.id.swDateBold);
|
||||
@@ -369,6 +371,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
});
|
||||
|
||||
swCategory.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("group_category", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swDate.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -1148,6 +1157,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swTabularBackground.setEnabled(!swCards.isChecked());
|
||||
swShadow.setEnabled(swCards.isChecked());
|
||||
swShadowHighlight.setEnabled(swShadow.isEnabled() && swShadow.isChecked());
|
||||
swCategory.setChecked(prefs.getBoolean("group_category", false));
|
||||
swDate.setChecked(prefs.getBoolean("date", true));
|
||||
swDateFixed.setChecked(prefs.getBoolean("date_fixed", false));
|
||||
swDateFixed.setEnabled(!swDate.isChecked());
|
||||
|
||||
Reference in New Issue
Block a user