diff --git a/app/build.gradle b/app/build.gradle index ca0494be..c6612ee5 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "eu.faircode.email" minSdkVersion 23 targetSdkVersion 28 - versionCode 45 - versionName "0.45" + versionCode 46 + versionName "0.46" archivesBaseName = "FairEmail-v$versionName" javaCompileOptions { diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index d3b89c78..d5e54f64 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -681,9 +681,21 @@ public class FragmentCompose extends FragmentEx { account = db.account().getAccount(ref.account); // Reply to recipient, not to known self + List identities = db.identity().getIdentities(); + + if (ref.reply != null && ref.reply.length > 0) { + String reply = Helper.canonicalAddress(((InternetAddress) ref.reply[0]).getAddress()); + for (EntityIdentity identity : identities) { + String email = Helper.canonicalAddress(identity.email); + if (reply.equals(email)) { + ref.reply = null; + break; + } + } + } + if (ref.from != null && ref.from.length > 0) { String from = Helper.canonicalAddress(((InternetAddress) ref.from[0]).getAddress()); - List identities = db.identity().getIdentities(); for (EntityIdentity identity : identities) { String email = Helper.canonicalAddress(identity.email); if (from.equals(email)) {