|
|
|
@ -83,6 +83,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
private TextView tvAutoSeenHint;
|
|
|
|
|
private TextView tvOnClose;
|
|
|
|
|
private Spinner spOnClose;
|
|
|
|
|
private SwitchCompat swAutoCloseUnseen;
|
|
|
|
|
private Spinner spUndoTimeout;
|
|
|
|
|
private SwitchCompat swCollapseMultiple;
|
|
|
|
|
private SwitchCompat swAutoRead;
|
|
|
|
@ -100,7 +101,8 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
"pull", "autoscroll", "quick_filter", "quick_scroll", "swipe_sensitivity",
|
|
|
|
|
"doubletap", "swipenav", "volumenav", "reversed", "swipe_close", "swipe_move",
|
|
|
|
|
"autoexpand", "expand_first", "expand_all", "expand_one", "collapse_multiple",
|
|
|
|
|
"autoclose", "onclose", "undo_timeout",
|
|
|
|
|
"autoclose", "onclose", "autoclose_unseen",
|
|
|
|
|
"undo_timeout",
|
|
|
|
|
"autoread", "flag_snoozed", "autounflag", "auto_important", "reset_importance"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -141,6 +143,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
swAutoClose = view.findViewById(R.id.swAutoClose);
|
|
|
|
|
tvOnClose = view.findViewById(R.id.tvOnClose);
|
|
|
|
|
spOnClose = view.findViewById(R.id.spOnClose);
|
|
|
|
|
swAutoCloseUnseen = view.findViewById(R.id.swAutoCloseUnseen);
|
|
|
|
|
spUndoTimeout = view.findViewById(R.id.spUndoTimeout);
|
|
|
|
|
swAutoRead = view.findViewById(R.id.swAutoRead);
|
|
|
|
|
swFlagSnoozed = view.findViewById(R.id.swFlagSnoozed);
|
|
|
|
@ -386,6 +389,13 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swAutoCloseUnseen.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("autoclose_unseen", checked).apply();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
spUndoTimeout.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onItemSelected(AdapterView<?> adapterView, View view, int position, long id) {
|
|
|
|
@ -524,6 +534,8 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
tvOnClose.setEnabled(!swAutoClose.isChecked());
|
|
|
|
|
spOnClose.setEnabled(!swAutoClose.isChecked());
|
|
|
|
|
|
|
|
|
|
swAutoCloseUnseen.setChecked(prefs.getBoolean("autoclose_unseen", false));
|
|
|
|
|
|
|
|
|
|
int undo_timeout = prefs.getInt("undo_timeout", 5000);
|
|
|
|
|
int[] undoValues = getResources().getIntArray(R.array.undoValues);
|
|
|
|
|
for (int pos = 0; pos < undoValues.length; pos++)
|
|
|
|
|