mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 22:26:06 +02:00
Added option to disable stars
This commit is contained in:
@@ -78,6 +78,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
private SwitchCompat swAvatars;
|
||||
private SwitchCompat swIdenticons;
|
||||
private SwitchCompat swNameEmail;
|
||||
private SwitchCompat swFlags;
|
||||
private SwitchCompat swPreview;
|
||||
private SwitchCompat swAddresses;
|
||||
private SwitchCompat swHtml;
|
||||
@@ -107,7 +108,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
private Group grpNotification;
|
||||
|
||||
static String[] OPTIONS_RESTART = new String[]{
|
||||
"unified", "date", "threading", "avatars", "identicons", "name_email", "preview", "addresses", "autoimages", "actionbar",
|
||||
"unified", "date", "threading", "avatars", "identicons", "name_email", "flags", "preview", "addresses", "autoimages", "actionbar",
|
||||
"pull", "swipenav", "autoexpand", "autoclose", "autonext",
|
||||
"debug"
|
||||
};
|
||||
@@ -115,7 +116,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
private final static String[] ADVANCED_OPTIONS = new String[]{
|
||||
"enabled", "schedule_start", "schedule_end",
|
||||
"metered", "download",
|
||||
"unified", "date", "threading", "avatars", "identicons", "name_email", "preview", "addresses", "autoimages", "actionbar",
|
||||
"unified", "date", "threading", "avatars", "identicons", "name_email", "flags", "preview", "addresses", "autoimages", "actionbar",
|
||||
"pull", "swipenav", "autoexpand", "autoclose", "autonext", "collapse", "autoread", "automove",
|
||||
"autoresize", "sender", "autosend",
|
||||
"notify_preview", "search_local", "light", "sound",
|
||||
@@ -148,6 +149,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
swAvatars = view.findViewById(R.id.swAvatars);
|
||||
swIdenticons = view.findViewById(R.id.swIdenticons);
|
||||
swNameEmail = view.findViewById(R.id.swNameEmail);
|
||||
swFlags = view.findViewById(R.id.swFlags);
|
||||
swPreview = view.findViewById(R.id.swPreview);
|
||||
swAddresses = view.findViewById(R.id.swAddresses);
|
||||
swHtml = view.findViewById(R.id.swHtml);
|
||||
@@ -312,6 +314,13 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
}
|
||||
});
|
||||
|
||||
swFlags.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("flags", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swPreview.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -553,6 +562,7 @@ public class FragmentOptions extends FragmentBase implements SharedPreferences.O
|
||||
swAvatars.setChecked(prefs.getBoolean("avatars", true));
|
||||
swIdenticons.setChecked(prefs.getBoolean("identicons", false));
|
||||
swNameEmail.setChecked(prefs.getBoolean("name_email", !compact));
|
||||
swFlags.setChecked(prefs.getBoolean("flags", true));
|
||||
swPreview.setChecked(prefs.getBoolean("preview", false));
|
||||
swAddresses.setChecked(prefs.getBoolean("addresses", true));
|
||||
swHtml.setChecked(prefs.getBoolean("autohtml", false));
|
||||
|
||||
Reference in New Issue
Block a user