Special case

This commit is contained in:
M66B 2019-03-30 10:18:16 +00:00
parent 834e868d63
commit f3214fa65f
1 changed files with 18 additions and 13 deletions

View File

@ -1717,19 +1717,24 @@ public class FragmentCompose extends FragmentBase {
draft.thread = ref.thread;
// Special case
String from = null;
String to = null;
String me = Helper.canonicalAddress(Helper.myAddress().getAddress());
if (ref.from != null && ref.from.length > 0)
from = Helper.canonicalAddress(((InternetAddress) ref.from[0]).getAddress());
if (ref.to != null && ref.to.length > 0)
to = Helper.canonicalAddress(((InternetAddress) ref.to[0]).getAddress());
if (from != null && from.equals(me)) {
if (to != null && to.equals(me))
draft.to = ref.reply;
else
draft.to = ref.to;
draft.from = ref.from;
if (BuildConfig.DEBUG) {
String from = null;
String to = null;
String me = Helper.canonicalAddress(Helper.myAddress().getAddress());
if (ref.from != null && ref.from.length > 0)
from = Helper.canonicalAddress(((InternetAddress) ref.from[0]).getAddress());
if (ref.to != null && ref.to.length > 0)
to = Helper.canonicalAddress(((InternetAddress) ref.to[0]).getAddress());
if (from != null && from.equals(me)) {
if (to != null && to.equals(me))
draft.to = ref.reply;
else
draft.to = ref.to;
draft.from = ref.from;
} else {
draft.to = (ref.reply == null || ref.reply.length == 0 ? ref.from : ref.reply);
draft.from = ref.to;
}
} else {
draft.to = (ref.reply == null || ref.reply.length == 0 ? ref.from : ref.reply);
draft.from = ref.to;