Write above forwarded messages

This commit is contained in:
M66B 2021-08-18 14:47:58 +02:00
parent 7604c438fc
commit b8d30297e5
1 changed files with 7 additions and 7 deletions

View File

@ -4528,7 +4528,7 @@ public class FragmentCompose extends FragmentBase {
e.tagName("p"); e.tagName("p");
reply.appendChild(e); reply.appendChild(e);
if (write_below) if (write_below && data.draft.wasforwardedfrom == null)
document.body().prependChild(reply); document.body().prependChild(reply);
else else
document.body().appendChild(reply); document.body().appendChild(reply);
@ -4707,7 +4707,7 @@ public class FragmentCompose extends FragmentBase {
// Possibly external draft // Possibly external draft
for (Element e : ref) for (Element e : ref)
if (write_below) if (write_below && data.draft.wasforwardedfrom == null)
doc.body().prependChild(e); doc.body().prependChild(e);
else else
doc.body().appendChild(e); doc.body().appendChild(e);
@ -5232,7 +5232,7 @@ public class FragmentCompose extends FragmentBase {
Document c = JsoupEx.parse(body); Document c = JsoupEx.parse(body);
for (Element e : ref) for (Element e : ref)
if (write_below) if (write_below && draft.wasforwardedfrom == null)
c.body().prependChild(e); c.body().prependChild(e);
else else
c.body().appendChild(e); c.body().appendChild(e);
@ -5246,7 +5246,7 @@ public class FragmentCompose extends FragmentBase {
d = JsoupEx.parse(body); // Save d = JsoupEx.parse(body); // Save
for (Element e : ref) for (Element e : ref)
if (write_below) if (write_below && draft.wasforwardedfrom == null)
d.body().prependChild(e); d.body().prependChild(e);
else else
d.body().appendChild(e); d.body().appendChild(e);
@ -5831,8 +5831,8 @@ public class FragmentCompose extends FragmentBase {
getActivity().invalidateOptionsMenu(); getActivity().invalidateOptionsMenu();
} }
private static void addSignature(Context context, Document document, EntityMessage message, EntityIdentity identity) { private static void addSignature(Context context, Document document, EntityMessage draft, EntityIdentity identity) {
if (!message.signature || if (!draft.signature ||
identity == null || TextUtils.isEmpty(identity.signature)) identity == null || TextUtils.isEmpty(identity.signature))
return; return;
@ -5860,7 +5860,7 @@ public class FragmentCompose extends FragmentBase {
else if (ref.size() == 0 || signature_location == 2) // bottom else if (ref.size() == 0 || signature_location == 2) // bottom
document.body().appendChild(div); document.body().appendChild(div);
else if (signature_location == 1) // below text else if (signature_location == 1) // below text
if (write_below) if (write_below && draft.wasforwardedfrom == null)
document.body().appendChild(div); document.body().appendChild(div);
else else
ref.first().before(div); ref.first().before(div);