Added option to disable confirm moving messages

This commit is contained in:
M66B
2018-12-23 12:58:39 +00:00
parent ba6e632c60
commit cdb1695faa
4 changed files with 75 additions and 43 deletions

View File

@@ -75,6 +75,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
private SwitchCompat swActionbar;
private SwitchCompat swAutoclose;
private SwitchCompat swCollapse;
private SwitchCompat swAutoMove;
private SwitchCompat swConfirm;
private SwitchCompat swSender;
@@ -113,6 +114,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
swActionbar = view.findViewById(R.id.swActionbar);
swAutoclose = view.findViewById(R.id.swAutoclose);
swCollapse = view.findViewById(R.id.swCollapse);
swAutoMove = view.findViewById(R.id.swAutoMove);
swConfirm = view.findViewById(R.id.swConfirm);
swSender = view.findViewById(R.id.swSender);
@@ -313,6 +315,14 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
}
});
swAutoMove.setChecked(!prefs.getBoolean("automove", false));
swAutoMove.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("automove", !checked).apply();
}
});
swConfirm.setChecked(prefs.getBoolean("confirm", false));
swConfirm.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override