|
|
|
@ -58,6 +58,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
private SwitchCompat swCollapseMultiple;
|
|
|
|
|
private SwitchCompat swAutoRead;
|
|
|
|
|
private SwitchCompat swAutoUnflag;
|
|
|
|
|
private SwitchCompat swResetImportance;
|
|
|
|
|
private SwitchCompat swAutoMove;
|
|
|
|
|
private SwitchCompat swDiscardDelete;
|
|
|
|
|
private NumberPicker npDefaultSnooze;
|
|
|
|
@ -65,7 +66,8 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
|
"double_back", "pull", "autoscroll", "doubletap", "swipenav", "volumenav", "reversed",
|
|
|
|
|
"autoexpand", "expand_all", "expand_one", "collapse_multiple",
|
|
|
|
|
"autoclose", "onclose", "quick_filter", "quick_scroll", "autoread", "autounflag", "automove", "discard_delete",
|
|
|
|
|
"autoclose", "onclose", "quick_filter", "quick_scroll",
|
|
|
|
|
"autoread", "autounflag", "reset_importance", "automove", "discard_delete",
|
|
|
|
|
"default_snooze"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -96,6 +98,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
swQuickScroll = view.findViewById(R.id.swQuickScroll);
|
|
|
|
|
swAutoRead = view.findViewById(R.id.swAutoRead);
|
|
|
|
|
swAutoUnflag = view.findViewById(R.id.swAutoUnflag);
|
|
|
|
|
swResetImportance = view.findViewById(R.id.swResetImportance);
|
|
|
|
|
swAutoMove = view.findViewById(R.id.swAutoMove);
|
|
|
|
|
swDiscardDelete = view.findViewById(R.id.swDiscardDelete);
|
|
|
|
|
npDefaultSnooze = view.findViewById(R.id.npDefaultSnooze);
|
|
|
|
@ -242,6 +245,13 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swResetImportance.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("reset_importance", checked).apply();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swAutoMove.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
@ -341,6 +351,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
|
|
|
|
|
swAutoRead.setChecked(prefs.getBoolean("autoread", false));
|
|
|
|
|
swAutoUnflag.setChecked(prefs.getBoolean("autounflag", false));
|
|
|
|
|
swResetImportance.setChecked(prefs.getBoolean("reset_importance", false));
|
|
|
|
|
swAutoMove.setChecked(!prefs.getBoolean("automove", false));
|
|
|
|
|
swDiscardDelete.setChecked(prefs.getBoolean("discard_delete", false));
|
|
|
|
|
|
|
|
|
|