mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-26 15:40:59 +01:00
Indentation depends on cards
This commit is contained in:
@@ -88,7 +88,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
private SwitchCompat swActionbar;
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"theme", "landscape", "startup", "cards", "date", "threading", "indentation", "highlight_unread",
|
||||
"theme", "landscape", "startup", "cards", "indentation", "date", "threading", "highlight_unread",
|
||||
"avatars", "generated_icons", "identicons", "circular", "saturation", "brightness", "threshold",
|
||||
"name_email", "distinguish_contacts", "authentication",
|
||||
"subject_top", "subject_italic", "subject_ellipsize",
|
||||
@@ -111,9 +111,9 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swLandscape = view.findViewById(R.id.swLandscape);
|
||||
spStartup = view.findViewById(R.id.spStartup);
|
||||
swCards = view.findViewById(R.id.swCards);
|
||||
swIndentation = view.findViewById(R.id.swIndentation);
|
||||
swDate = view.findViewById(R.id.swDate);
|
||||
swThreading = view.findViewById(R.id.swThreading);
|
||||
swIndentation = view.findViewById(R.id.swIndentation);
|
||||
swHighlightUnread = view.findViewById(R.id.swHighlightUnread);
|
||||
swAvatars = view.findViewById(R.id.swAvatars);
|
||||
swGeneratedIcons = view.findViewById(R.id.swGeneratedIcons);
|
||||
@@ -182,6 +182,14 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("cards", checked).apply();
|
||||
swIndentation.setEnabled(checked);
|
||||
}
|
||||
});
|
||||
|
||||
swIndentation.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("indentation", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -200,13 +208,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
});
|
||||
|
||||
swIndentation.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("indentation", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swHighlightUnread.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -511,9 +512,10 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
|
||||
swCards.setChecked(prefs.getBoolean("cards", true));
|
||||
swIndentation.setChecked(prefs.getBoolean("indentation", false));
|
||||
swIndentation.setEnabled(swCards.isChecked());
|
||||
swDate.setChecked(prefs.getBoolean("date", true));
|
||||
swThreading.setChecked(prefs.getBoolean("threading", true));
|
||||
swIndentation.setChecked(prefs.getBoolean("indentation", false));
|
||||
swHighlightUnread.setChecked(prefs.getBoolean("highlight_unread", false));
|
||||
swAvatars.setChecked(prefs.getBoolean("avatars", true));
|
||||
swGeneratedIcons.setChecked(prefs.getBoolean("generated_icons", true));
|
||||
|
||||
Reference in New Issue
Block a user