|
|
@ -49,12 +49,13 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
private SwitchCompat swCollapse;
|
|
|
|
private SwitchCompat swCollapse;
|
|
|
|
private SwitchCompat swAutoRead;
|
|
|
|
private SwitchCompat swAutoRead;
|
|
|
|
private SwitchCompat swAutoMove;
|
|
|
|
private SwitchCompat swAutoMove;
|
|
|
|
|
|
|
|
private SwitchCompat swDiscardDelete;
|
|
|
|
private SwitchCompat swAuthentication;
|
|
|
|
private SwitchCompat swAuthentication;
|
|
|
|
private SwitchCompat swDisableTracking;
|
|
|
|
private SwitchCompat swDisableTracking;
|
|
|
|
|
|
|
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
"pull", "autoscroll", "swipenav", "doubletap", "autoexpand", "autoclose", "onclose",
|
|
|
|
"pull", "autoscroll", "swipenav", "doubletap", "autoexpand", "autoclose", "onclose",
|
|
|
|
"collapse", "autoread", "automove", "authentication", "disable_tracking"
|
|
|
|
"collapse", "autoread", "automove", "discard_delete", "authentication", "disable_tracking"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -77,6 +78,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
swCollapse = view.findViewById(R.id.swCollapse);
|
|
|
|
swCollapse = view.findViewById(R.id.swCollapse);
|
|
|
|
swAutoRead = view.findViewById(R.id.swAutoRead);
|
|
|
|
swAutoRead = view.findViewById(R.id.swAutoRead);
|
|
|
|
swAutoMove = view.findViewById(R.id.swAutoMove);
|
|
|
|
swAutoMove = view.findViewById(R.id.swAutoMove);
|
|
|
|
|
|
|
|
swDiscardDelete = view.findViewById(R.id.swDiscardDelete);
|
|
|
|
swAuthentication = view.findViewById(R.id.swAuthentication);
|
|
|
|
swAuthentication = view.findViewById(R.id.swAuthentication);
|
|
|
|
swDisableTracking = view.findViewById(R.id.swDisableTracking);
|
|
|
|
swDisableTracking = view.findViewById(R.id.swDisableTracking);
|
|
|
|
|
|
|
|
|
|
|
@ -167,6 +169,13 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swDiscardDelete.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
|
|
|
prefs.edit().putBoolean("discard_delete", checked).apply();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
swAuthentication.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
swAuthentication.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
@ -246,6 +255,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
swCollapse.setChecked(prefs.getBoolean("collapse", false));
|
|
|
|
swCollapse.setChecked(prefs.getBoolean("collapse", false));
|
|
|
|
swAutoRead.setChecked(prefs.getBoolean("autoread", false));
|
|
|
|
swAutoRead.setChecked(prefs.getBoolean("autoread", false));
|
|
|
|
swAutoMove.setChecked(!prefs.getBoolean("automove", false));
|
|
|
|
swAutoMove.setChecked(!prefs.getBoolean("automove", false));
|
|
|
|
|
|
|
|
swDiscardDelete.setChecked(prefs.getBoolean("discard_delete", false));
|
|
|
|
swAuthentication.setChecked(prefs.getBoolean("authentication", true));
|
|
|
|
swAuthentication.setChecked(prefs.getBoolean("authentication", true));
|
|
|
|
swDisableTracking.setChecked(prefs.getBoolean("disable_tracking", true));
|
|
|
|
swDisableTracking.setChecked(prefs.getBoolean("disable_tracking", true));
|
|
|
|
}
|
|
|
|
}
|
|
|
|