mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-31 20:25:38 +00:00
Check for header conditions on execute now
This commit is contained in:
parent
968ce7571b
commit
8d78200d2e
1 changed files with 7 additions and 2 deletions
|
@ -309,7 +309,7 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
|
|||
JSONObject jcondition = new JSONObject(rule.condition);
|
||||
JSONObject jheader = jcondition.optJSONObject("header");
|
||||
if (jheader != null)
|
||||
return 0;
|
||||
throw new IllegalArgumentException(context.getString(R.string.title_rule_no_headers));
|
||||
|
||||
int applied = 0;
|
||||
List<Long> ids =
|
||||
|
@ -347,7 +347,12 @@ public class AdapterRule extends RecyclerView.Adapter<AdapterRule.ViewHolder> {
|
|||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex, false);
|
||||
if (ex instanceof IllegalArgumentException)
|
||||
Snackbar.make(
|
||||
parentFragment.getView(), ex.getMessage(), Snackbar.LENGTH_LONG)
|
||||
.setGestureInsetBottomIgnored(true).show();
|
||||
else
|
||||
Log.unexpectedError(parentFragment.getParentFragmentManager(), ex, false);
|
||||
}
|
||||
}.execute(context, owner, args, "rule:execute");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue