Added IMAP compression (default enabled)

This commit is contained in:
M66B
2018-08-28 14:52:03 +00:00
parent bef7645705
commit e3b4674378
44 changed files with 81 additions and 9 deletions

View File

@@ -37,6 +37,7 @@ public class FragmentOptions extends FragmentEx {
private CheckBox cbWebView;
private TextView tvCustomTabs;
private CheckBox cbSanitize;
private CheckBox cbCompressImap;
private CheckBox cbDebug;
@Override
@@ -50,6 +51,7 @@ public class FragmentOptions extends FragmentEx {
cbWebView = view.findViewById(R.id.cbWebView);
tvCustomTabs = view.findViewById(R.id.tvCustomTabs);
cbSanitize = view.findViewById(R.id.cbSanitize);
cbCompressImap = view.findViewById(R.id.cbCompressImap);
cbDebug = view.findViewById(R.id.cbDebug);
// Wire controls
@@ -72,6 +74,14 @@ public class FragmentOptions extends FragmentEx {
}
});
cbCompressImap.setChecked(prefs.getBoolean("compress", true));
cbCompressImap.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("compress", checked).apply();
}
});
cbDebug.setChecked(prefs.getBoolean("debug", false));
cbDebug.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override