Added text separator option

This commit is contained in:
M66B
2020-09-13 08:34:48 +02:00
parent f14c2aa36a
commit 7267e33a0f
5 changed files with 32 additions and 7 deletions

View File

@@ -117,6 +117,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
private SwitchCompat swTextSize;
private SwitchCompat swTextFont;
private SwitchCompat swTextAlign;
private SwitchCompat swTextSeparators;
private SwitchCompat swCollapseQuotes;
private SwitchCompat swImagesInline;
private SwitchCompat swAttachmentsAlt;
@@ -135,7 +136,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
"keywords_header", "labels_header", "flags", "flags_background",
"preview", "preview_italic", "preview_lines",
"addresses",
"message_zoom", "overview_mode", "contrast", "monospaced", "text_color", "text_size", "text_font", "text_align",
"message_zoom", "overview_mode", "contrast", "monospaced",
"text_color", "text_size", "text_font", "text_align", "text_separators",
"inline_images", "collapse_quotes", "attachments_alt", "thumbnails",
"parse_classes", "authentication"
};
@@ -207,6 +209,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
swTextSize = view.findViewById(R.id.swTextSize);
swTextFont = view.findViewById(R.id.swTextFont);
swTextAlign = view.findViewById(R.id.swTextAlign);
swTextSeparators = view.findViewById(R.id.swTextSeparators);
swCollapseQuotes = view.findViewById(R.id.swCollapseQuotes);
swImagesInline = view.findViewById(R.id.swImagesInline);
swAttachmentsAlt = view.findViewById(R.id.swAttachmentsAlt);
@@ -693,6 +696,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
}
});
swTextSeparators.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("text_separators", checked).apply();
}
});
swCollapseQuotes.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@@ -889,6 +899,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
swTextSize.setChecked(prefs.getBoolean("text_size", true));
swTextFont.setChecked(prefs.getBoolean("text_font", true));
swTextAlign.setChecked(prefs.getBoolean("text_align", true));
swTextSeparators.setChecked(prefs.getBoolean("text_separators", true));
swCollapseQuotes.setChecked(prefs.getBoolean("collapse_quotes", false));
swImagesInline.setChecked(prefs.getBoolean("inline_images", false));
swAttachmentsAlt.setChecked(prefs.getBoolean("attachments_alt", false));