1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-03-06 03:33:07 +00:00

Extra without plus

This commit is contained in:
M66B 2018-12-01 13:21:15 +01:00
parent 5099d233e6
commit 206e7f22cc
3 changed files with 3 additions and 4 deletions

View file

@ -193,7 +193,7 @@ public class FragmentCompose extends FragmentEx {
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
EntityIdentity identity = (EntityIdentity) parent.getAdapter().getItem(position);
int at = (identity == null ? -1 : identity.email.indexOf('@'));
tvExtraPrefix.setText(at < 0 ? null : identity.email.substring(0, at) + "+");
tvExtraPrefix.setText(at < 0 ? null : identity.email.substring(0, at));
tvExtraSuffix.setText(at < 0 ? null : identity.email.substring(at));
if (pro) {
tvSignature.setText(identity == null ? null : Html.fromHtml(identity.signature));

View file

@ -197,8 +197,7 @@ public class MessageHelper {
String name = ((InternetAddress) message.from[0]).getPersonal();
if (email != null && !TextUtils.isEmpty(message.extra)) {
int at = email.indexOf('@');
boolean separator = Character.isLetterOrDigit(message.extra.charAt(0));
email = email.substring(0, at) + (separator ? "+" : "") + message.extra + email.substring(at);
email = email.substring(0, at) + message.extra + email.substring(at);
Log.i(Helper.TAG, "extra=" + email);
}
imessage.setFrom(new InternetAddress(email, name));

View file

@ -49,7 +49,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:text="name+"
android:text="name"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintBottom_toBottomOf="@+id/etExtra"
app:layout_constraintStart_toStartOf="parent"