mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-02 11:01:23 +01:00
Added option to enable inverting original message
This commit is contained in:
@@ -86,6 +86,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
private SwitchCompat swMonospaced;
|
||||
private SwitchCompat swHtml;
|
||||
private SwitchCompat swImages;
|
||||
private SwitchCompat swInvert;
|
||||
private SwitchCompat swActionbar;
|
||||
|
||||
private SwitchCompat swPull;
|
||||
@@ -120,7 +121,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
|
||||
static String[] OPTIONS_RESTART = new String[]{
|
||||
"startup", "date", "threading", "avatars", "identicons", "name_email", "subject_italic", "flags", "preview",
|
||||
"addresses", "monospaced", "autohtml", "autoimages", "actionbar",
|
||||
"addresses", "monospaced", "autohtml", "autoimages", "invert", "actionbar",
|
||||
"pull", "swipenav", "autoexpand", "autoclose", "autonext",
|
||||
"authentication", "debug"
|
||||
};
|
||||
@@ -129,7 +130,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
"enabled", "schedule_start", "schedule_end",
|
||||
"metered", "download", "roaming",
|
||||
"startup", "date", "threading", "avatars", "identicons", "name_email", "subject_italic", "flags", "preview",
|
||||
"addresses", "monospaced", "autohtml", "autoimages", "actionbar",
|
||||
"addresses", "monospaced", "autohtml", "autoimages", "invert", "actionbar",
|
||||
"pull", "swipenav", "autoexpand", "autoclose", "autonext", "collapse", "autoread", "automove",
|
||||
"autoresize", "resize", "prefix_once", "autosend",
|
||||
"notify_preview", "search_local", "light", "sound",
|
||||
@@ -171,6 +172,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
swMonospaced = view.findViewById(R.id.swMonospaced);
|
||||
swHtml = view.findViewById(R.id.swHtml);
|
||||
swImages = view.findViewById(R.id.swImages);
|
||||
swInvert = view.findViewById(R.id.swInvert);
|
||||
swActionbar = view.findViewById(R.id.swActionbar);
|
||||
|
||||
swPull = view.findViewById(R.id.swPull);
|
||||
@@ -390,6 +392,13 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
}
|
||||
});
|
||||
|
||||
swInvert.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("invert", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swActionbar.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -686,6 +695,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
swMonospaced.setChecked(prefs.getBoolean("monospaced", false));
|
||||
swHtml.setChecked(prefs.getBoolean("autohtml", false));
|
||||
swImages.setChecked(prefs.getBoolean("autoimages", false));
|
||||
swInvert.setChecked(prefs.getBoolean("invert", false));
|
||||
swActionbar.setChecked(prefs.getBoolean("actionbar", true));
|
||||
|
||||
swPull.setChecked(prefs.getBoolean("pull", true));
|
||||
|
||||
Reference in New Issue
Block a user