mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-27 16:10:58 +01:00
Added option to show inline images by default
This commit is contained in:
@@ -55,12 +55,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
private SwitchCompat swAddresses;
|
||||
private SwitchCompat swAttachmentsAlt;
|
||||
private SwitchCompat swMonospaced;
|
||||
private SwitchCompat swInline;
|
||||
private SwitchCompat swImages;
|
||||
private SwitchCompat swActionbar;
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"theme", "startup", "date", "threading", "avatars", "identicons", "circular", "name_email", "subject_italic",
|
||||
"flags", "preview", "addresses", "attachments_alt", "monospaced", "autoimages", "actionbar",
|
||||
"flags", "preview", "addresses", "attachments_alt", "monospaced", "inline_images", "autoimages", "actionbar",
|
||||
};
|
||||
|
||||
@Override
|
||||
@@ -87,6 +88,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swAddresses = view.findViewById(R.id.swAddresses);
|
||||
swAttachmentsAlt = view.findViewById(R.id.swAttachmentsAlt);
|
||||
swMonospaced = view.findViewById(R.id.swMonospaced);
|
||||
swInline = view.findViewById(R.id.swInline);
|
||||
swImages = view.findViewById(R.id.swImages);
|
||||
swActionbar = view.findViewById(R.id.swActionbar);
|
||||
|
||||
@@ -203,6 +205,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
}
|
||||
});
|
||||
|
||||
swInline.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
prefs.edit().putBoolean("inline_images", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
swImages.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
||||
@@ -283,6 +292,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
||||
swAddresses.setChecked(prefs.getBoolean("addresses", false));
|
||||
swAttachmentsAlt.setChecked(prefs.getBoolean("attachments_alt", false));
|
||||
swMonospaced.setChecked(prefs.getBoolean("monospaced", false));
|
||||
swInline.setChecked(prefs.getBoolean("inline_images", false));
|
||||
swImages.setChecked(prefs.getBoolean("autoimages", false));
|
||||
swActionbar.setChecked(prefs.getBoolean("actionbar", true));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user