|
|
|
@ -91,6 +91,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
private SwitchCompat swAutoUnflag;
|
|
|
|
|
private SwitchCompat swAutoImportant;
|
|
|
|
|
private SwitchCompat swResetImportance;
|
|
|
|
|
private SwitchCompat swReplyAll;
|
|
|
|
|
|
|
|
|
|
final static int MAX_SWIPE_SENSITIVITY = 10;
|
|
|
|
|
final static int DEFAULT_SWIPE_SENSITIVITY = 7;
|
|
|
|
@ -103,7 +104,8 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
"autoexpand", "expand_first", "expand_all", "expand_one", "collapse_multiple",
|
|
|
|
|
"autoclose", "onclose", "autoclose_unseen",
|
|
|
|
|
"undo_timeout",
|
|
|
|
|
"autoread", "flag_snoozed", "autounflag", "auto_important", "reset_importance"
|
|
|
|
|
"autoread", "flag_snoozed", "autounflag", "auto_important", "reset_importance",
|
|
|
|
|
"reply_all"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -150,6 +152,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
swAutoUnflag = view.findViewById(R.id.swAutoUnflag);
|
|
|
|
|
swAutoImportant = view.findViewById(R.id.swAutoImportant);
|
|
|
|
|
swResetImportance = view.findViewById(R.id.swResetImportance);
|
|
|
|
|
swReplyAll = view.findViewById(R.id.swReplyAll);
|
|
|
|
|
|
|
|
|
|
setOptions();
|
|
|
|
|
|
|
|
|
@ -445,6 +448,13 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swReplyAll.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("reply_all", checked).apply();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// Initialize
|
|
|
|
|
FragmentDialogTheme.setBackground(getContext(), view, false);
|
|
|
|
|
|
|
|
|
@ -549,6 +559,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
swAutoUnflag.setChecked(prefs.getBoolean("autounflag", false));
|
|
|
|
|
swAutoImportant.setChecked(prefs.getBoolean("auto_important", false));
|
|
|
|
|
swResetImportance.setChecked(prefs.getBoolean("reset_importance", false));
|
|
|
|
|
swReplyAll.setChecked(prefs.getBoolean("reply_all", false));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static class FragmentDialogSwipes extends FragmentDialogBase {
|
|
|
|
|