mirror of
https://github.com/moparisthebest/k-9
synced 2025-01-13 22:58:03 -05:00
Fixed issue 331: Now delete temporary draft created by screen rotation when email is sent or discarded
This commit is contained in:
parent
b8f4fdb882
commit
5186c3610f
@ -773,6 +773,14 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
|||||||
*/
|
*/
|
||||||
MessagingController.getInstance(getApplication()).deleteMessage( mAccount, mFolder, mSourceMessage, null);
|
MessagingController.getInstance(getApplication()).deleteMessage( mAccount, mFolder, mSourceMessage, null);
|
||||||
}
|
}
|
||||||
|
if (mDraftUid != null) {
|
||||||
|
/*
|
||||||
|
* Message was auto-saved (screen rotation) so delete that draft before sending
|
||||||
|
*/
|
||||||
|
Message draftMessage = new MimeMessage();
|
||||||
|
draftMessage.setUid(mDraftUid);
|
||||||
|
MessagingController.getInstance(getApplication()).deleteMessage( mAccount, mAccount.getDraftsFolderName(), draftMessage, null);
|
||||||
|
}
|
||||||
MessagingController.getInstance(getApplication()).sendMessage(mAccount, message, null);
|
MessagingController.getInstance(getApplication()).sendMessage(mAccount, message, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -802,6 +810,10 @@ public class MessageCompose extends K9Activity implements OnClickListener, OnFoc
|
|||||||
MessagingController.getInstance(getApplication()).deleteMessage( mAccount, mFolder, mSourceMessage, null);
|
MessagingController.getInstance(getApplication()).deleteMessage( mAccount, mFolder, mSourceMessage, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (mDraftUid != null) {
|
||||||
|
Message draftMessage = new MimeMessage();
|
||||||
|
MessagingController.getInstance(getApplication()).deleteMessage( mAccount, mAccount.getDraftsFolderName(), draftMessage, null);
|
||||||
|
}
|
||||||
mHandler.sendEmptyMessage(MSG_DISCARDED_DRAFT);
|
mHandler.sendEmptyMessage(MSG_DISCARDED_DRAFT);
|
||||||
mDraftNeedsSaving = false;
|
mDraftNeedsSaving = false;
|
||||||
finish();
|
finish();
|
||||||
|
Loading…
Reference in New Issue
Block a user