Salvage draft in case of errors

This is know to happen due to "Exception while computing database live data"
pull/160/head
M66B 5 years ago
parent 7b3d0a106b
commit 45379870b1

@ -2614,7 +2614,10 @@ public class FragmentCompose extends FragmentBase {
null);
}
} else {
String previous = Helper.readText(draft.getFile(context));
File file = draft.getFile(context);
if (!file.exists())
Helper.writeText(file, body);
String previous = Helper.readText(file);
if (!body.equals(previous) ||
plain_only != (draft.plain_only != null && draft.plain_only)) {
dirty = true;

Loading…
Cancel
Save