mirror of https://github.com/M66B/FairEmail.git
Rule NOT regex
This commit is contained in:
parent
0181493b4a
commit
c72a5194c2
|
@ -237,6 +237,7 @@ public class EntityRule {
|
||||||
// Sender
|
// Sender
|
||||||
JSONObject jsender = jcondition.optJSONObject("sender");
|
JSONObject jsender = jcondition.optJSONObject("sender");
|
||||||
if (jsender != null) {
|
if (jsender != null) {
|
||||||
|
boolean not = jsender.optBoolean("not");
|
||||||
String value = jsender.getString("value");
|
String value = jsender.getString("value");
|
||||||
boolean regex = jsender.getBoolean("regex");
|
boolean regex = jsender.getBoolean("regex");
|
||||||
boolean known = jsender.optBoolean("known");
|
boolean known = jsender.optBoolean("known");
|
||||||
|
@ -279,13 +280,14 @@ public class EntityRule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!matches)
|
if (matches == not)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recipient
|
// Recipient
|
||||||
JSONObject jrecipient = jcondition.optJSONObject("recipient");
|
JSONObject jrecipient = jcondition.optJSONObject("recipient");
|
||||||
if (jrecipient != null) {
|
if (jrecipient != null) {
|
||||||
|
boolean not = jrecipient.optBoolean("not");
|
||||||
String value = jrecipient.getString("value");
|
String value = jrecipient.getString("value");
|
||||||
boolean regex = jrecipient.getBoolean("regex");
|
boolean regex = jrecipient.getBoolean("regex");
|
||||||
|
|
||||||
|
@ -306,17 +308,18 @@ public class EntityRule {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!matches)
|
if (matches == not)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Subject
|
// Subject
|
||||||
JSONObject jsubject = jcondition.optJSONObject("subject");
|
JSONObject jsubject = jcondition.optJSONObject("subject");
|
||||||
if (jsubject != null) {
|
if (jsubject != null) {
|
||||||
|
boolean not = jsubject.optBoolean("not");
|
||||||
String value = jsubject.getString("value");
|
String value = jsubject.getString("value");
|
||||||
boolean regex = jsubject.getBoolean("regex");
|
boolean regex = jsubject.getBoolean("regex");
|
||||||
|
|
||||||
if (!matches(context, message, value, message.subject, regex))
|
if (matches(context, message, value, message.subject, regex) == not)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,6 +467,7 @@ public class EntityRule {
|
||||||
// Body
|
// Body
|
||||||
JSONObject jbody = jcondition.optJSONObject("body");
|
JSONObject jbody = jcondition.optJSONObject("body");
|
||||||
if (jbody != null) {
|
if (jbody != null) {
|
||||||
|
boolean not = jbody.optBoolean("not");
|
||||||
String value = jbody.getString("value");
|
String value = jbody.getString("value");
|
||||||
boolean regex = jbody.getBoolean("regex");
|
boolean regex = jbody.getBoolean("regex");
|
||||||
boolean skip_quotes = jbody.optBoolean("skip_quotes");
|
boolean skip_quotes = jbody.optBoolean("skip_quotes");
|
||||||
|
@ -493,11 +497,11 @@ public class EntityRule {
|
||||||
d.select("blockquote").remove();
|
d.select("blockquote").remove();
|
||||||
if (jsoup) {
|
if (jsoup) {
|
||||||
String selector = value.substring(JSOUP_PREFIX.length());
|
String selector = value.substring(JSOUP_PREFIX.length());
|
||||||
if (d.select(selector).size() == 0)
|
if (d.select(selector).isEmpty() != not)
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
String text = d.body().text();
|
String text = d.body().text();
|
||||||
if (!matches(context, message, value, text, regex))
|
if (matches(context, message, value, text, regex) == not)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,15 +93,18 @@ public class FragmentRule extends FragmentBase {
|
||||||
private EditText etAge;
|
private EditText etAge;
|
||||||
private CheckBox cbStop;
|
private CheckBox cbStop;
|
||||||
|
|
||||||
|
private CheckBox cbSenderNot;
|
||||||
private EditText etSender;
|
private EditText etSender;
|
||||||
private CheckBox cbSender;
|
private CheckBox cbSender;
|
||||||
private ImageButton ibSender;
|
private ImageButton ibSender;
|
||||||
private CheckBox cbKnownSender;
|
private CheckBox cbKnownSender;
|
||||||
|
|
||||||
|
private CheckBox cbRecipientNot;
|
||||||
private EditText etRecipient;
|
private EditText etRecipient;
|
||||||
private CheckBox cbRecipient;
|
private CheckBox cbRecipient;
|
||||||
private ImageButton ibRecipient;
|
private ImageButton ibRecipient;
|
||||||
|
|
||||||
|
private CheckBox cbSubjectNot;
|
||||||
private EditText etSubject;
|
private EditText etSubject;
|
||||||
private CheckBox cbSubject;
|
private CheckBox cbSubject;
|
||||||
|
|
||||||
|
@ -112,6 +115,7 @@ public class FragmentRule extends FragmentBase {
|
||||||
private ImageButton ibHeader;
|
private ImageButton ibHeader;
|
||||||
private CheckBox cbHeader;
|
private CheckBox cbHeader;
|
||||||
|
|
||||||
|
private CheckBox cbBodyNot;
|
||||||
private EditText etBody;
|
private EditText etBody;
|
||||||
private CheckBox cbBody;
|
private CheckBox cbBody;
|
||||||
private CheckBox cbSkipQuotes;
|
private CheckBox cbSkipQuotes;
|
||||||
|
@ -288,15 +292,18 @@ public class FragmentRule extends FragmentBase {
|
||||||
etAge = view.findViewById(R.id.etAge);
|
etAge = view.findViewById(R.id.etAge);
|
||||||
cbStop = view.findViewById(R.id.cbStop);
|
cbStop = view.findViewById(R.id.cbStop);
|
||||||
|
|
||||||
|
cbSenderNot = view.findViewById(R.id.cbSenderNot);
|
||||||
etSender = view.findViewById(R.id.etSender);
|
etSender = view.findViewById(R.id.etSender);
|
||||||
cbSender = view.findViewById(R.id.cbSender);
|
cbSender = view.findViewById(R.id.cbSender);
|
||||||
ibSender = view.findViewById(R.id.ibSender);
|
ibSender = view.findViewById(R.id.ibSender);
|
||||||
cbKnownSender = view.findViewById(R.id.cbKnownSender);
|
cbKnownSender = view.findViewById(R.id.cbKnownSender);
|
||||||
|
|
||||||
|
cbRecipientNot = view.findViewById(R.id.cbRecipientNot);
|
||||||
etRecipient = view.findViewById(R.id.etRecipient);
|
etRecipient = view.findViewById(R.id.etRecipient);
|
||||||
cbRecipient = view.findViewById(R.id.cbRecipient);
|
cbRecipient = view.findViewById(R.id.cbRecipient);
|
||||||
ibRecipient = view.findViewById(R.id.ibRecipient);
|
ibRecipient = view.findViewById(R.id.ibRecipient);
|
||||||
|
|
||||||
|
cbSubjectNot = view.findViewById(R.id.cbSubjectNot);
|
||||||
etSubject = view.findViewById(R.id.etSubject);
|
etSubject = view.findViewById(R.id.etSubject);
|
||||||
cbSubject = view.findViewById(R.id.cbSubject);
|
cbSubject = view.findViewById(R.id.cbSubject);
|
||||||
|
|
||||||
|
@ -307,6 +314,7 @@ public class FragmentRule extends FragmentBase {
|
||||||
ibHeader = view.findViewById(R.id.ibHeader);
|
ibHeader = view.findViewById(R.id.ibHeader);
|
||||||
cbHeader = view.findViewById(R.id.cbHeader);
|
cbHeader = view.findViewById(R.id.cbHeader);
|
||||||
|
|
||||||
|
cbBodyNot = view.findViewById(R.id.cbBodyNot);
|
||||||
etBody = view.findViewById(R.id.etBody);
|
etBody = view.findViewById(R.id.etBody);
|
||||||
cbBody = view.findViewById(R.id.cbBody);
|
cbBody = view.findViewById(R.id.cbBody);
|
||||||
cbSkipQuotes = view.findViewById(R.id.cbSkipQuotes);
|
cbSkipQuotes = view.findViewById(R.id.cbSkipQuotes);
|
||||||
|
@ -708,8 +716,6 @@ public class FragmentRule extends FragmentBase {
|
||||||
npDuration.setMinValue(0);
|
npDuration.setMinValue(0);
|
||||||
npDuration.setMaxValue(999);
|
npDuration.setMaxValue(999);
|
||||||
|
|
||||||
tvActionRemark.setVisibility(View.GONE);
|
|
||||||
|
|
||||||
btnColor.setOnClickListener(new View.OnClickListener() {
|
btnColor.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
|
@ -915,7 +921,6 @@ public class FragmentRule extends FragmentBase {
|
||||||
|
|
||||||
tvActionRemark.setText(
|
tvActionRemark.setText(
|
||||||
getString(R.string.title_rule_action_remark, data.folder.getDisplayName(getContext())));
|
getString(R.string.title_rule_action_remark, data.folder.getDisplayName(getContext())));
|
||||||
tvActionRemark.setVisibility(View.VISIBLE);
|
|
||||||
|
|
||||||
loadRule(savedInstanceState);
|
loadRule(savedInstanceState);
|
||||||
}
|
}
|
||||||
|
@ -1234,6 +1239,7 @@ public class FragmentRule extends FragmentBase {
|
||||||
etAge.setText(jgeneral == null ? null : Integer.toString(jgeneral.optInt("age")));
|
etAge.setText(jgeneral == null ? null : Integer.toString(jgeneral.optInt("age")));
|
||||||
cbStop.setChecked(rule != null && rule.stop);
|
cbStop.setChecked(rule != null && rule.stop);
|
||||||
|
|
||||||
|
cbSenderNot.setChecked(jsender != null && jsender.optBoolean("not"));
|
||||||
etSender.setText(jsender == null ? args.getString("sender") : jsender.getString("value"));
|
etSender.setText(jsender == null ? args.getString("sender") : jsender.getString("value"));
|
||||||
cbSender.setChecked(jsender != null && jsender.getBoolean("regex"));
|
cbSender.setChecked(jsender != null && jsender.getBoolean("regex"));
|
||||||
cbKnownSender.setChecked(jsender != null && jsender.optBoolean("known"));
|
cbKnownSender.setChecked(jsender != null && jsender.optBoolean("known"));
|
||||||
|
@ -1241,9 +1247,11 @@ public class FragmentRule extends FragmentBase {
|
||||||
ibSender.setEnabled(!cbKnownSender.isChecked());
|
ibSender.setEnabled(!cbKnownSender.isChecked());
|
||||||
cbSender.setEnabled(!cbKnownSender.isChecked());
|
cbSender.setEnabled(!cbKnownSender.isChecked());
|
||||||
|
|
||||||
|
cbRecipientNot.setChecked(jrecipient != null && jrecipient.optBoolean("not"));
|
||||||
etRecipient.setText(jrecipient == null ? args.getString("recipient") : jrecipient.getString("value"));
|
etRecipient.setText(jrecipient == null ? args.getString("recipient") : jrecipient.getString("value"));
|
||||||
cbRecipient.setChecked(jrecipient != null && jrecipient.getBoolean("regex"));
|
cbRecipient.setChecked(jrecipient != null && jrecipient.getBoolean("regex"));
|
||||||
|
|
||||||
|
cbSubjectNot.setChecked(jsubject != null && jsubject.optBoolean("not"));
|
||||||
etSubject.setText(jsubject == null ? args.getString("subject") : jsubject.getString("value"));
|
etSubject.setText(jsubject == null ? args.getString("subject") : jsubject.getString("value"));
|
||||||
cbSubject.setChecked(jsubject != null && jsubject.getBoolean("regex"));
|
cbSubject.setChecked(jsubject != null && jsubject.getBoolean("regex"));
|
||||||
|
|
||||||
|
@ -1254,6 +1262,7 @@ public class FragmentRule extends FragmentBase {
|
||||||
etHeader.setText(jheader == null ? null : jheader.getString("value"));
|
etHeader.setText(jheader == null ? null : jheader.getString("value"));
|
||||||
cbHeader.setChecked(jheader != null && jheader.getBoolean("regex"));
|
cbHeader.setChecked(jheader != null && jheader.getBoolean("regex"));
|
||||||
|
|
||||||
|
cbBodyNot.setChecked(jbody != null && jbody.optBoolean("not"));
|
||||||
etBody.setText(jbody == null ? null : jbody.getString("value"));
|
etBody.setText(jbody == null ? null : jbody.getString("value"));
|
||||||
cbBody.setChecked(jbody != null && jbody.getBoolean("regex"));
|
cbBody.setChecked(jbody != null && jbody.getBoolean("regex"));
|
||||||
cbSkipQuotes.setChecked(jbody != null && jbody.optBoolean("skip_quotes"));
|
cbSkipQuotes.setChecked(jbody != null && jbody.optBoolean("skip_quotes"));
|
||||||
|
@ -1625,6 +1634,7 @@ public class FragmentRule extends FragmentBase {
|
||||||
boolean known = cbKnownSender.isChecked();
|
boolean known = cbKnownSender.isChecked();
|
||||||
if (!TextUtils.isEmpty(sender) || known) {
|
if (!TextUtils.isEmpty(sender) || known) {
|
||||||
JSONObject jsender = new JSONObject();
|
JSONObject jsender = new JSONObject();
|
||||||
|
jsender.put("not", cbSenderNot.isChecked());
|
||||||
jsender.put("value", sender);
|
jsender.put("value", sender);
|
||||||
jsender.put("regex", cbSender.isChecked());
|
jsender.put("regex", cbSender.isChecked());
|
||||||
jsender.put("known", known);
|
jsender.put("known", known);
|
||||||
|
@ -1634,6 +1644,7 @@ public class FragmentRule extends FragmentBase {
|
||||||
String recipient = etRecipient.getText().toString();
|
String recipient = etRecipient.getText().toString();
|
||||||
if (!TextUtils.isEmpty(recipient)) {
|
if (!TextUtils.isEmpty(recipient)) {
|
||||||
JSONObject jrecipient = new JSONObject();
|
JSONObject jrecipient = new JSONObject();
|
||||||
|
jrecipient.put("not", cbRecipientNot.isChecked());
|
||||||
jrecipient.put("value", recipient);
|
jrecipient.put("value", recipient);
|
||||||
jrecipient.put("regex", cbRecipient.isChecked());
|
jrecipient.put("regex", cbRecipient.isChecked());
|
||||||
jcondition.put("recipient", jrecipient);
|
jcondition.put("recipient", jrecipient);
|
||||||
|
@ -1642,6 +1653,7 @@ public class FragmentRule extends FragmentBase {
|
||||||
String subject = etSubject.getText().toString();
|
String subject = etSubject.getText().toString();
|
||||||
if (!TextUtils.isEmpty(subject)) {
|
if (!TextUtils.isEmpty(subject)) {
|
||||||
JSONObject jsubject = new JSONObject();
|
JSONObject jsubject = new JSONObject();
|
||||||
|
jsubject.put("not", cbSubjectNot.isChecked());
|
||||||
jsubject.put("value", subject);
|
jsubject.put("value", subject);
|
||||||
jsubject.put("regex", cbSubject.isChecked());
|
jsubject.put("regex", cbSubject.isChecked());
|
||||||
jcondition.put("subject", jsubject);
|
jcondition.put("subject", jsubject);
|
||||||
|
@ -1661,6 +1673,7 @@ public class FragmentRule extends FragmentBase {
|
||||||
String body = etBody.getText().toString();
|
String body = etBody.getText().toString();
|
||||||
if (!TextUtils.isEmpty(body)) {
|
if (!TextUtils.isEmpty(body)) {
|
||||||
JSONObject jbody = new JSONObject();
|
JSONObject jbody = new JSONObject();
|
||||||
|
jbody.put("not", cbBodyNot.isChecked());
|
||||||
jbody.put("value", body);
|
jbody.put("value", body);
|
||||||
jbody.put("regex", cbBody.isChecked());
|
jbody.put("regex", cbBody.isChecked());
|
||||||
jbody.put("skip_quotes", cbSkipQuotes.isChecked());
|
jbody.put("skip_quotes", cbSkipQuotes.isChecked());
|
||||||
|
|
|
@ -177,15 +177,27 @@
|
||||||
<!-- condition -->
|
<!-- condition -->
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvCondition"
|
android:id="@+id/tvSenderCondition"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:text="@string/title_rule_and"
|
android:text="@string/title_rule_and"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/cbSenderNot"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/cbSenderNot" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/cbSenderNot"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="@string/title_rule_not"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tvSenderCondition"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tvStopRemark" />
|
app:layout_constraintTop_toBottomOf="@+id/tvStopRemark" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -194,7 +206,7 @@
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="?attr/colorSeparator"
|
android:background="?attr/colorSeparator"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvCondition" />
|
app:layout_constraintTop_toBottomOf="@id/cbSenderNot" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvSender"
|
android:id="@+id/tvSender"
|
||||||
|
@ -251,15 +263,27 @@
|
||||||
app:layout_constraintTop_toBottomOf="@id/etSender" />
|
app:layout_constraintTop_toBottomOf="@id/etSender" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvAndSender"
|
android:id="@+id/tvRecipientCondition"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:text="@string/title_rule_and"
|
android:text="@string/title_rule_and"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/cbRecipientNot"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/cbRecipientNot" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/cbRecipientNot"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="@string/title_rule_not"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tvRecipientCondition"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cbKnownSender" />
|
app:layout_constraintTop_toBottomOf="@+id/cbKnownSender" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -268,7 +292,7 @@
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="?attr/colorSeparator"
|
android:background="?attr/colorSeparator"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvAndSender" />
|
app:layout_constraintTop_toBottomOf="@id/cbRecipientNot" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvRecipient"
|
android:id="@+id/tvRecipient"
|
||||||
|
@ -317,15 +341,27 @@
|
||||||
app:srcCompat="@drawable/twotone_person_add_24" />
|
app:srcCompat="@drawable/twotone_person_add_24" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvAndRecipient"
|
android:id="@+id/tvSubjectCondition"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:text="@string/title_rule_and"
|
android:text="@string/title_rule_and"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/cbSubjectNot"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/cbSubjectNot" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/cbSubjectNot"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="@string/title_rule_not"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tvSubjectCondition"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/etRecipient" />
|
app:layout_constraintTop_toBottomOf="@+id/etRecipient" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -334,7 +370,7 @@
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="?attr/colorSeparator"
|
android:background="?attr/colorSeparator"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvAndRecipient" />
|
app:layout_constraintTop_toBottomOf="@id/cbSubjectNot" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvSubject"
|
android:id="@+id/tvSubject"
|
||||||
|
@ -482,15 +518,28 @@
|
||||||
app:layout_constraintTop_toBottomOf="@id/cbHeader" />
|
app:layout_constraintTop_toBottomOf="@id/cbHeader" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvAndHeader"
|
android:id="@+id/tvBodyCondition"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
|
||||||
android:text="@string/title_rule_and"
|
android:text="@string/title_rule_and"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/cbBodyNot"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/cbBodyNot" />
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
android:id="@+id/cbBodyNot"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="12dp"
|
||||||
|
android:layout_marginTop="24dp"
|
||||||
|
android:text="@string/title_rule_not"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_chainStyle="packed"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/tvBodyCondition"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/etHeader" />
|
app:layout_constraintTop_toBottomOf="@+id/etHeader" />
|
||||||
|
|
||||||
<View
|
<View
|
||||||
|
@ -499,7 +548,7 @@
|
||||||
android:layout_height="1dp"
|
android:layout_height="1dp"
|
||||||
android:background="?attr/colorSeparator"
|
android:background="?attr/colorSeparator"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvAndHeader" />
|
app:layout_constraintTop_toBottomOf="@id/cbBodyNot" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvBody"
|
android:id="@+id/tvBody"
|
||||||
|
@ -1327,16 +1376,20 @@
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
app:constraint_referenced_ids="
|
app:constraint_referenced_ids="
|
||||||
tvTitle,tvFolder,tvName,etName,tvOrder,etOrder,cbEnabled,cbDaily,cbStop,
|
tvTitle,tvFolder,tvName,etName,tvGroup,etGroup,tvOrder,etOrder,cbEnabled,cbDaily,cbStop,tvStopRemark,
|
||||||
tvCondition,
|
tvSenderCondition,cbSenderNot,
|
||||||
vSeparatorSender,tvSender,cbSender,etSender,ibSender,cbKnownSender,tvAndSender,
|
vSeparatorSender,tvSender,cbSender,etSender,ibSender,cbKnownSender,
|
||||||
vSeparatorRecipient,tvRecipient,cbRecipient,etRecipient,ibRecipient,tvAndRecipient,
|
tvRecipientCondition,cbRecipientNot,
|
||||||
|
vSeparatorRecipient,tvRecipient,cbRecipient,etRecipient,ibRecipient,
|
||||||
|
tvSubjectCondition,cbSubjectNot,
|
||||||
vSeparatorSubject,tvSubject,cbSubject,etSubject,tvAndSubject,
|
vSeparatorSubject,tvSubject,cbSubject,etSubject,tvAndSubject,
|
||||||
vSeparatorAttachments,cbAttachments,tvMimeType,etMimeType,tvAndAttachments,
|
vSeparatorAttachments,cbAttachments,tvMimeType,etMimeType,tvAndAttachments,
|
||||||
vSeparatorHeader,tvHeader,cbHeader,etHeader,tvAndHeader,
|
vSeparatorHeader,tvHeader,ibHeader,cbHeader,etHeader,
|
||||||
|
tvBodyCondition,cbBodyNot,
|
||||||
vSeparatorBody,tvBody,cbBody,etBody,tvBodyRemark,cbSkipQuotes,tvAndBody,
|
vSeparatorBody,tvBody,cbBody,etBody,tvBodyRemark,cbSkipQuotes,tvAndBody,
|
||||||
vSeparatorDate,tvDate,tvDateAfter,btnDateAfter,tvDateBefore,btnDateBefore,tvAndDate,
|
vSeparatorDate,tvDate,tvDateAfter,btnDateAfter,tvDateBefore,btnDateBefore,tvAndDate,
|
||||||
vSeparatorSchedule,tvSchedule,spScheduleDayStart,spScheduleDayEnd,tvScheduleHourStart,tvScheduleHourEnd,
|
vSeparatorSchedule,tvSchedule,spScheduleDayStart,spScheduleDayEnd,tvScheduleHourStart,tvScheduleHourEnd,cbEveryDay,
|
||||||
|
tvAndYounger,vSeparatorYounger,tvYounger,etYounger,
|
||||||
vSeparatorAction,tvAction,spAction,tvActionRemark,
|
vSeparatorAction,tvAction,spAction,tvActionRemark,
|
||||||
vSeparatorParameters" />
|
vSeparatorParameters" />
|
||||||
|
|
||||||
|
|
|
@ -2046,6 +2046,7 @@
|
||||||
<string name="title_rule_younger">Messages younger than (hours)</string>
|
<string name="title_rule_younger">Messages younger than (hours)</string>
|
||||||
<string name="title_rule_regex">Regex</string>
|
<string name="title_rule_regex">Regex</string>
|
||||||
<string name="title_rule_and">AND</string>
|
<string name="title_rule_and">AND</string>
|
||||||
|
<string name="title_rule_not">NOT</string>
|
||||||
<string name="title_rule_action">Action</string>
|
<string name="title_rule_action">Action</string>
|
||||||
<string name="title_rule_action_remark">This action will be applied to new messages arriving in the folder %1$s</string>
|
<string name="title_rule_action_remark">This action will be applied to new messages arriving in the folder %1$s</string>
|
||||||
<string name="title_rule_hours">Hours</string>
|
<string name="title_rule_hours">Hours</string>
|
||||||
|
|
Loading…
Reference in New Issue