mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-28 08:46:01 +00:00
Simplification
This commit is contained in:
parent
85fc6494d3
commit
d92777b692
1 changed files with 1 additions and 9 deletions
|
@ -1617,16 +1617,8 @@ public class FragmentCompose extends FragmentBase {
|
|||
};
|
||||
bpContent.setContent(imessage.getContent(), imessage.getContentType());
|
||||
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
bpContent.writeTo(bos);
|
||||
|
||||
// Just to be sure
|
||||
String raw = new String(bos.toByteArray());
|
||||
raw.replaceAll(" +$", "") // trim trailing spaces
|
||||
.replace("\\r?\\n", "\\r\\n"); // normalize new lines
|
||||
|
||||
try (OutputStream out = new FileOutputStream(input)) {
|
||||
out.write(raw.getBytes());
|
||||
bpContent.writeTo(out);
|
||||
}
|
||||
} else {
|
||||
// Serialize message
|
||||
|
|
Loading…
Reference in a new issue