mirror of https://github.com/M66B/FairEmail.git
Add recipient to create rule
This commit is contained in:
parent
bbfb33bae6
commit
b7df1875ac
|
@ -2395,6 +2395,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
rule.putExtra("folder", data.message.folder);
|
||||
if (data.message.from != null && data.message.from.length > 0)
|
||||
rule.putExtra("sender", ((InternetAddress) data.message.from[0]).getAddress());
|
||||
if (data.message.to != null && data.message.to.length > 0)
|
||||
rule.putExtra("recipient", ((InternetAddress) data.message.to[0]).getAddress());
|
||||
if (!TextUtils.isEmpty(data.message.subject))
|
||||
rule.putExtra("subject", data.message.subject);
|
||||
|
||||
|
|
|
@ -371,6 +371,7 @@ public class FragmentRule extends FragmentBase {
|
|||
Bundle rargs = new Bundle();
|
||||
rargs.putLong("id", id);
|
||||
rargs.putString("sender", getArguments().getString("sender"));
|
||||
rargs.putString("recipient", getArguments().getString("recipient"));
|
||||
rargs.putString("subject", getArguments().getString("subject"));
|
||||
|
||||
new SimpleTask<TupleRuleEx>() {
|
||||
|
@ -399,7 +400,7 @@ public class FragmentRule extends FragmentBase {
|
|||
etSender.setText(jsender == null ? args.getString("sender") : jsender.getString("value"));
|
||||
cbSender.setChecked(jsender != null && jsender.getBoolean("regex"));
|
||||
|
||||
etRecipient.setText(jrecipient == null ? null : jrecipient.getString("value"));
|
||||
etRecipient.setText(jrecipient == null ? args.getString("recipient") : jrecipient.getString("value"));
|
||||
cbRecipient.setChecked(jrecipient != null && jrecipient.getBoolean("regex"));
|
||||
|
||||
etSubject.setText(jsubject == null ? args.getString("subject") : jsubject.getString("value"));
|
||||
|
|
Loading…
Reference in New Issue