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