mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 07:06:18 +02:00
Added unread shadow option
This commit is contained in:
@@ -64,6 +64,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
private Spinner spStartup;
|
||||
private SwitchCompat swCards;
|
||||
private SwitchCompat swBeige;
|
||||
private SwitchCompat swShadow;
|
||||
private SwitchCompat swDate;
|
||||
private SwitchCompat swNavBarColorize;
|
||||
private SwitchCompat swPortrait2;
|
||||
@@ -139,7 +140,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
private NumberFormat NF = NumberFormat.getNumberInstance();
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"theme", "startup", "cards", "beige", "date", "navbar_colorize", "portrait2", "landscape", "landscape3",
|
||||
"theme", "startup", "cards", "beige", "shadow_unread",
|
||||
"date", "navbar_colorize", "portrait2", "landscape", "landscape3",
|
||||
"threading", "threading_unread", "indentation", "seekbar", "actionbar", "actionbar_color",
|
||||
"highlight_unread", "highlight_color", "color_stripe",
|
||||
"avatars", "gravatars", "favicons", "generated_icons", "identicons", "circular", "saturation", "brightness", "threshold",
|
||||
@@ -168,6 +170,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
spStartup = view.findViewById(R.id.spStartup);
|
||||
swCards = view.findViewById(R.id.swCards);
|
||||
swBeige = view.findViewById(R.id.swBeige);
|
||||
swShadow = view.findViewById(R.id.swShadow);
|
||||
swDate = view.findViewById(R.id.swDate);
|
||||
swNavBarColorize = view.findViewById(R.id.swNavBarColorize);
|
||||
swPortrait2 = view.findViewById(R.id.swPortrait2);
|
||||
@@ -268,6 +271,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("cards", checked).apply();
|
||||
swBeige.setEnabled(checked);
|
||||
swShadow.setEnabled(checked);
|
||||
swIndentation.setEnabled(checked);
|
||||
}
|
||||
});
|
||||
@@ -279,6 +283,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
});
|
||||
|
||||
swShadow.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("shadow_unread", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swDate.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -887,7 +898,9 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
|
||||
swCards.setChecked(prefs.getBoolean("cards", true));
|
||||
swBeige.setChecked(prefs.getBoolean("beige", true));
|
||||
swShadow.setChecked(prefs.getBoolean("shadow_unread", false));
|
||||
swBeige.setEnabled(swCards.isChecked());
|
||||
swShadow.setEnabled(swCards.isChecked());
|
||||
swDate.setChecked(prefs.getBoolean("date", true));
|
||||
swNavBarColorize.setChecked(prefs.getBoolean("navbar_colorize", false));
|
||||
swPortrait2.setChecked(prefs.getBoolean("portrait2", false));
|
||||
|
||||
Reference in New Issue
Block a user