mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-02 21:24:34 +00:00
Added reply-to address entry to identity
This commit is contained in:
parent
c37f5b934d
commit
1e25a9f97c
3 changed files with 30 additions and 1 deletions
|
@ -59,6 +59,7 @@ public class FragmentIdentity extends Fragment {
|
||||||
private Spinner spProfile;
|
private Spinner spProfile;
|
||||||
private EditText etName;
|
private EditText etName;
|
||||||
private EditText etEmail;
|
private EditText etEmail;
|
||||||
|
private EditText etReplyTo;
|
||||||
private EditText etHost;
|
private EditText etHost;
|
||||||
private CheckBox cbStartTls;
|
private CheckBox cbStartTls;
|
||||||
private EditText etPort;
|
private EditText etPort;
|
||||||
|
@ -86,6 +87,7 @@ public class FragmentIdentity extends Fragment {
|
||||||
spProfile = view.findViewById(R.id.spProvider);
|
spProfile = view.findViewById(R.id.spProvider);
|
||||||
etName = view.findViewById(R.id.etName);
|
etName = view.findViewById(R.id.etName);
|
||||||
etEmail = view.findViewById(R.id.etEmail);
|
etEmail = view.findViewById(R.id.etEmail);
|
||||||
|
etReplyTo = view.findViewById(R.id.etReplyTo);
|
||||||
etHost = view.findViewById(R.id.etHost);
|
etHost = view.findViewById(R.id.etHost);
|
||||||
cbStartTls = view.findViewById(R.id.cbStartTls);
|
cbStartTls = view.findViewById(R.id.cbStartTls);
|
||||||
etPort = view.findViewById(R.id.etPort);
|
etPort = view.findViewById(R.id.etPort);
|
||||||
|
@ -152,6 +154,7 @@ public class FragmentIdentity extends Fragment {
|
||||||
args.putLong("id", id);
|
args.putLong("id", id);
|
||||||
args.putString("name", etName.getText().toString());
|
args.putString("name", etName.getText().toString());
|
||||||
args.putString("email", etEmail.getText().toString());
|
args.putString("email", etEmail.getText().toString());
|
||||||
|
args.putString("replyto", etReplyTo.getText().toString());
|
||||||
args.putString("host", etHost.getText().toString());
|
args.putString("host", etHost.getText().toString());
|
||||||
args.putBoolean("starttls", cbStartTls.isChecked());
|
args.putBoolean("starttls", cbStartTls.isChecked());
|
||||||
args.putString("port", etPort.getText().toString());
|
args.putString("port", etPort.getText().toString());
|
||||||
|
@ -169,6 +172,7 @@ public class FragmentIdentity extends Fragment {
|
||||||
public void onChanged(@Nullable EntityIdentity identity) {
|
public void onChanged(@Nullable EntityIdentity identity) {
|
||||||
etName.setText(identity == null ? null : identity.name);
|
etName.setText(identity == null ? null : identity.name);
|
||||||
etEmail.setText(identity == null ? null : identity.email);
|
etEmail.setText(identity == null ? null : identity.email);
|
||||||
|
etReplyTo.setText(identity == null ? null : identity.replyto);
|
||||||
etHost.setText(identity == null ? null : identity.host);
|
etHost.setText(identity == null ? null : identity.host);
|
||||||
cbStartTls.setChecked(identity == null ? false : identity.starttls);
|
cbStartTls.setChecked(identity == null ? false : identity.starttls);
|
||||||
etPort.setText(identity == null ? null : Long.toString(identity.port));
|
etPort.setText(identity == null ? null : Long.toString(identity.port));
|
||||||
|
@ -216,6 +220,7 @@ public class FragmentIdentity extends Fragment {
|
||||||
identity = new EntityIdentity();
|
identity = new EntityIdentity();
|
||||||
identity.name = Objects.requireNonNull(args.getString("name"));
|
identity.name = Objects.requireNonNull(args.getString("name"));
|
||||||
identity.email = Objects.requireNonNull(args.getString("email"));
|
identity.email = Objects.requireNonNull(args.getString("email"));
|
||||||
|
identity.replyto = args.getString("replyto");
|
||||||
identity.host = host;
|
identity.host = host;
|
||||||
identity.port = Integer.parseInt(port);
|
identity.port = Integer.parseInt(port);
|
||||||
identity.starttls = starttls;
|
identity.starttls = starttls;
|
||||||
|
|
|
@ -53,6 +53,28 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvEmail" />
|
app:layout_constraintTop_toBottomOf="@id/tvEmail" />
|
||||||
|
|
||||||
|
<!-- reply to -->
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvReplyTo"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
|
android:text="@string/title_reply_to"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/etEmail" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/etReplyTo"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/title_optional"
|
||||||
|
android:inputType="textEmailAddress"
|
||||||
|
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvReplyTo" />
|
||||||
|
|
||||||
<!--- provider -->
|
<!--- provider -->
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -63,7 +85,7 @@
|
||||||
android:text="@string/title_provider"
|
android:text="@string/title_provider"
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/etEmail" />
|
app:layout_constraintTop_toBottomOf="@id/etReplyTo" />
|
||||||
|
|
||||||
<Spinner
|
<Spinner
|
||||||
android:id="@+id/spProvider"
|
android:id="@+id/spProvider"
|
||||||
|
|
|
@ -39,6 +39,8 @@
|
||||||
|
|
||||||
<string name="title_name">Your name</string>
|
<string name="title_name">Your name</string>
|
||||||
<string name="title_email">Your email address</string>
|
<string name="title_email">Your email address</string>
|
||||||
|
<string name="title_reply_to">Reply to address</string>
|
||||||
|
<string name="title_optional">Optional</string>
|
||||||
<string name="title_account_name">Account name</string>
|
<string name="title_account_name">Account name</string>
|
||||||
<string name="title_account_name_hint">optional</string>
|
<string name="title_account_name_hint">optional</string>
|
||||||
<string name="title_imap">IMAP</string>
|
<string name="title_imap">IMAP</string>
|
||||||
|
|
Loading…
Reference in a new issue