Create outbox on setup

To make sure the event listener is started
This commit is contained in:
M66B
2018-08-03 16:21:18 +00:00
parent 222a16b963
commit 5f77582bec
2 changed files with 22 additions and 13 deletions

View File

@@ -599,20 +599,9 @@ public class FragmentCompose extends Fragment {
if (draft.to == null && draft.cc == null && draft.bcc == null)
throw new MessagingException(getContext().getString(R.string.title_to_missing));
// Get outbox
EntityFolder outbox = folder.getOutbox();
if (outbox == null) {
outbox = new EntityFolder();
outbox.name = "OUTBOX";
outbox.type = EntityFolder.TYPE_OUTBOX;
outbox.synchronize = false;
outbox.after = 0;
outbox.id = folder.insertFolder(outbox);
}
// Build outgoing message
EntityMessage out = new EntityMessage();
out.folder = outbox.id;
out.folder = folder.getOutbox().id;
out.identity = draft.identity;
out.replying = draft.replying;
out.thread = draft.thread;