mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-30 05:44:51 +02:00
Added option to download plain text only part by default
This commit is contained in:
@@ -62,6 +62,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
||||
private SwitchCompat swRlah;
|
||||
private SwitchCompat swDownloadHeaders;
|
||||
private SwitchCompat swDownloadEml;
|
||||
private SwitchCompat swDownloadPlain;
|
||||
private SwitchCompat swValidated;
|
||||
private SwitchCompat swVpnOnly;
|
||||
private EditText etTimeout;
|
||||
@@ -82,7 +83,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
||||
|
||||
private final static String[] RESET_OPTIONS = new String[]{
|
||||
"metered", "download", "roaming", "rlah",
|
||||
"download_headers", "download_eml",
|
||||
"download_headers", "download_eml", "download_plain",
|
||||
"require_validated", "vpn_only",
|
||||
"timeout", "prefer_ip4", "bind_socket", "standalone_vpn", "tcp_keep_alive",
|
||||
"ssl_harden", "cert_strict"
|
||||
@@ -104,6 +105,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
||||
swRlah = view.findViewById(R.id.swRlah);
|
||||
swDownloadHeaders = view.findViewById(R.id.swDownloadHeaders);
|
||||
swDownloadEml = view.findViewById(R.id.swDownloadEml);
|
||||
swDownloadPlain = view.findViewById(R.id.swDownloadPlain);
|
||||
swValidated = view.findViewById(R.id.swValidated);
|
||||
swVpnOnly = view.findViewById(R.id.swVpnOnly);
|
||||
etTimeout = view.findViewById(R.id.etTimeout);
|
||||
@@ -179,6 +181,13 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
||||
}
|
||||
});
|
||||
|
||||
swDownloadPlain.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean checked) {
|
||||
prefs.edit().putBoolean("download_plain", checked).apply();
|
||||
}
|
||||
});
|
||||
|
||||
grpValidated.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.M ? View.GONE : View.VISIBLE);
|
||||
swValidated.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
@@ -371,6 +380,7 @@ public class FragmentOptionsConnection extends FragmentBase implements SharedPre
|
||||
|
||||
swDownloadHeaders.setChecked(prefs.getBoolean("download_headers", false));
|
||||
swDownloadEml.setChecked(prefs.getBoolean("download_eml", false));
|
||||
swDownloadPlain.setChecked(prefs.getBoolean("download_plain", false));
|
||||
|
||||
swValidated.setChecked(prefs.getBoolean("require_validated", false));
|
||||
swVpnOnly.setChecked(prefs.getBoolean("vpn_only", false));
|
||||
|
||||
Reference in New Issue
Block a user