Don't mark deleted message as empty
LocalMessage.destroy() will handle converting the deleted message to an
empty message if necessary.
@@ -307,7 +307,11 @@ public class LocalMessage extends MimeMessage {
public Void doDbWork(final SQLiteDatabase db) throws WrappedException, UnavailableStorageException {
ContentValues cv = new ContentValues();
cv.put("deleted", 1);
- cv.put("empty", 1);
+ cv.put("preview_type", DatabasePreviewType.fromPreviewType(PreviewType.NONE).getDatabaseValue());
+ cv.put("read", 0);
+ cv.put("flagged", 0);
+ cv.put("answered", 0);
+ cv.put("forwarded", 0);
cv.putNull("subject");
cv.putNull("sender_list");
cv.putNull("date");
@@ -317,6 +321,11 @@ public class LocalMessage extends MimeMessage {
cv.putNull("preview");
cv.putNull("reply_to_list");
cv.putNull("message_part_id");
+ cv.putNull("flags");
+ cv.putNull("attachment_count");
+ cv.putNull("internal_date");
+ cv.putNull("mime_type");
+ cv.putNull("encryption_type");
db.update("messages", cv, "id = ?", new String[] { Long.toString(databaseId) });
