Removed compress / prever IPv4 options

This commit is contained in:
M66B
2018-09-21 13:18:26 +00:00
parent 8dbf639a48
commit a1b2f99983
9 changed files with 13 additions and 61 deletions

View File

@@ -32,10 +32,8 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
public class FragmentOptions extends FragmentEx {
private CheckBox cbCompressImap;
private CheckBox cbAvatars;
private CheckBox cbLight;
private CheckBox cbIpV4;
private CheckBox cbDebug;
@Override
@@ -46,25 +44,14 @@ public class FragmentOptions extends FragmentEx {
View view = inflater.inflate(R.layout.fragment_options, container, false);
// Get controls
cbCompressImap = view.findViewById(R.id.cbCompressImap);
cbAvatars = view.findViewById(R.id.cbAvatars);
cbLight = view.findViewById(R.id.cbLight);
cbIpV4 = view.findViewById(R.id.cbIpV4);
cbDebug = view.findViewById(R.id.cbDebug);
// Wire controls
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
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();
ServiceSynchronize.reload(getContext(), "compress=" + checked);
}
});
cbAvatars.setChecked(prefs.getBoolean("avatars", true));
cbAvatars.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
@@ -81,15 +68,6 @@ public class FragmentOptions extends FragmentEx {
}
});
cbIpV4.setChecked(prefs.getBoolean("ipv4", false));
cbIpV4.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("ipv4", checked).apply();
ServiceSynchronize.reload(getContext(), "IPv4=" + checked);
}
});
cbDebug.setChecked(prefs.getBoolean("debug", false));
cbDebug.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override