mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-05 08:33:37 +02:00
Added rule action option to include message text
This commit is contained in:
@@ -140,6 +140,7 @@ public class FragmentRule extends FragmentBase {
|
||||
private Spinner spIdent;
|
||||
|
||||
private Spinner spAnswer;
|
||||
private CheckBox cbIncludeMessageText;
|
||||
private EditText etTo;
|
||||
private ImageButton ibTo;
|
||||
private CheckBox cbCc;
|
||||
@@ -290,6 +291,7 @@ public class FragmentRule extends FragmentBase {
|
||||
spIdent = view.findViewById(R.id.spIdent);
|
||||
|
||||
spAnswer = view.findViewById(R.id.spAnswer);
|
||||
cbIncludeMessageText = view.findViewById(R.id.cbIncludeMessageText);
|
||||
etTo = view.findViewById(R.id.etTo);
|
||||
ibTo = view.findViewById(R.id.ibTo);
|
||||
cbCc = view.findViewById(R.id.cbCc);
|
||||
@@ -1137,6 +1139,8 @@ public class FragmentRule extends FragmentBase {
|
||||
break;
|
||||
}
|
||||
|
||||
cbIncludeMessageText.setChecked(jaction.optBoolean("text", true));
|
||||
|
||||
etTo.setText(jaction.optString("to"));
|
||||
cbCc.setChecked(jaction.optBoolean("cc"));
|
||||
cbWithAttachments.setChecked(jaction.optBoolean("attachments"));
|
||||
@@ -1477,6 +1481,7 @@ public class FragmentRule extends FragmentBase {
|
||||
EntityAnswer answer = (EntityAnswer) spAnswer.getSelectedItem();
|
||||
jaction.put("identity", identity == null ? -1 : identity.id);
|
||||
jaction.put("answer", answer == null || answer.id == null ? -1 : answer.id);
|
||||
jaction.put("text", cbIncludeMessageText.isChecked());
|
||||
jaction.put("to", etTo.getText().toString().trim());
|
||||
jaction.put("cc", cbCc.isChecked());
|
||||
jaction.put("attachments", cbWithAttachments.isChecked());
|
||||
|
||||
Reference in New Issue
Block a user