For a while, it was possible for users to conifgure their outbox and

drafts folders to be the same folder. This could result in drafts being
sent over and over.  This change uses the K-9 Identity header as a
shibboleth for drafts, as it's not actually set when a message is sent.
This commit is contained in:
Jesse Vincent 2011-04-17 21:07:13 +10:00
parent 659a5d36b2
commit 724b6eaaa5
1 changed files with 10 additions and 0 deletions

View File

@ -3025,6 +3025,16 @@ public class MessagingController implements Runnable {
localFolder.fetch(new Message[] { message }, fp, null);
try {
if (message.getHeader(K9.IDENTITY_HEADER) != null) {
Log.v(K9.LOG_TAG, "The user has set the Outbox and Drafts folder to the same thing. " +
"This message appears to be a draft, so K-9 will not send it");
continue;
}
message.setFlag(Flag.X_SEND_IN_PROGRESS, true);
if (K9.DEBUG)
Log.i(K9.LOG_TAG, "Sending message with UID " + message.getUid());