k9mail/k-9 — pull request #397 by d09 (2013-10-06 13:10:28+00:00)
Title: Add SEEN to list of flags when deleting a message.

Currently when you delete a message it only sets the DELETED flag, so unless you also always expunge immediately afterwards (not always desirable), any other processes examining the IMAP mailbox will see an unread (albeit deleted) message. Since most MUAs check only the number of unread messages to determine whether new mail has arrived, and not whether those new messages also were deleted, they will report that there is new mail in the mailbox even after you deleted it with K-9 Mail.

This patch sets the SEEN flag when you delete the message, solving this problem.