Added option for group email addresses

This commit is contained in:
M66B
2020-06-30 08:31:07 +02:00
parent a245ed28da
commit e2438261c5
9 changed files with 2320 additions and 5 deletions

View File

@@ -105,6 +105,7 @@ public class FragmentIdentity extends FragmentBase {
private CheckBox cbSynchronize;
private CheckBox cbPrimary;
private CheckBox cbSelf;
private CheckBox cbSenderExtra;
private TextView etSenderExtra;
@@ -196,6 +197,7 @@ public class FragmentIdentity extends FragmentBase {
cbSynchronize = view.findViewById(R.id.cbSynchronize);
cbPrimary = view.findViewById(R.id.cbPrimary);
cbSelf = view.findViewById(R.id.cbSelf);
cbSenderExtra = view.findViewById(R.id.cbSenderExtra);
etSenderExtra = view.findViewById(R.id.etSenderExtra);
@@ -601,6 +603,7 @@ public class FragmentIdentity extends FragmentBase {
args.putString("signature", signature);
args.putBoolean("synchronize", cbSynchronize.isChecked());
args.putBoolean("primary", cbPrimary.isChecked());
args.putBoolean("self", cbSelf.isChecked());
args.putBoolean("should", should);
@@ -651,6 +654,7 @@ public class FragmentIdentity extends FragmentBase {
String ehlo = args.getString("ehlo");
boolean synchronize = args.getBoolean("synchronize");
boolean primary = args.getBoolean("primary");
boolean self = args.getBoolean("self");
boolean sender_extra = args.getBoolean("sender_extra");
String sender_extra_regex = args.getString("sender_extra_regex");
@@ -781,6 +785,8 @@ public class FragmentIdentity extends FragmentBase {
return true;
if (!Objects.equals(identity.primary, (identity.synchronize && primary)))
return true;
if (!Objects.equals(identity.self, self))
return true;
if (!Objects.equals(identity.sender_extra, sender_extra))
return true;
if (!Objects.equals(identity.sender_extra_regex, sender_extra_regex))
@@ -869,6 +875,7 @@ public class FragmentIdentity extends FragmentBase {
identity.ehlo = ehlo;
identity.synchronize = synchronize;
identity.primary = (identity.synchronize && primary);
identity.self = self;
identity.sender_extra = sender_extra;
identity.sender_extra_regex = sender_extra_regex;
@@ -1073,6 +1080,7 @@ public class FragmentIdentity extends FragmentBase {
etEhlo.setText(identity == null ? null : identity.ehlo);
cbSynchronize.setChecked(identity == null ? true : identity.synchronize);
cbPrimary.setChecked(identity == null ? true : identity.primary);
cbSelf.setChecked(identity == null ? true : identity.self);
cbSenderExtra.setChecked(identity != null && identity.sender_extra);
etSenderExtra.setText(identity == null ? null : identity.sender_extra_regex);