From 51fe459dfcbd2e51587523b010a25062feb7bd1a Mon Sep 17 00:00:00 2001 From: Marcel Wiegand Date: Sun, 13 Dec 2015 02:17:38 +0100 Subject: [PATCH] Remove Flag.X_GOT_ALL_HEADERS. Fixes #891 --- .../src/main/java/com/fsck/k9/mail/Flag.java | 7 ------- .../fsck/k9/mailstore/StoreSchemaDefinition.java | 1 - .../main/java/com/fsck/k9/view/MessageHeader.java | 13 +------------ 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/k9mail-library/src/main/java/com/fsck/k9/mail/Flag.java b/k9mail-library/src/main/java/com/fsck/k9/mail/Flag.java index e60192463..029165097 100644 --- a/k9mail-library/src/main/java/com/fsck/k9/mail/Flag.java +++ b/k9mail-library/src/main/java/com/fsck/k9/mail/Flag.java @@ -48,11 +48,4 @@ public enum Flag { * Indicates that the copy of a message to the Sent folder has started. */ X_REMOTE_COPY_STARTED, - - /** - * Indicates that all headers of the message have been stored in the - * database. If this is false, additional headers might be retrieved from - * the server (if the message is still there). - */ - X_GOT_ALL_HEADERS, } diff --git a/k9mail/src/main/java/com/fsck/k9/mailstore/StoreSchemaDefinition.java b/k9mail/src/main/java/com/fsck/k9/mailstore/StoreSchemaDefinition.java index 8f93b37dd..be6f3b409 100644 --- a/k9mail/src/main/java/com/fsck/k9/mailstore/StoreSchemaDefinition.java +++ b/k9mail/src/main/java/com/fsck/k9/mailstore/StoreSchemaDefinition.java @@ -433,7 +433,6 @@ class StoreSchemaDefinition implements LockableDatabase.SchemaDefinition { case X_DESTROYED: case X_DOWNLOADED_FULL: case X_DOWNLOADED_PARTIAL: - case X_GOT_ALL_HEADERS: case X_REMOTE_COPY_STARTED: case X_SEND_FAILED: case X_SEND_IN_PROGRESS: { diff --git a/k9mail/src/main/java/com/fsck/k9/view/MessageHeader.java b/k9mail/src/main/java/com/fsck/k9/view/MessageHeader.java index a536676d7..3eaeef76b 100644 --- a/k9mail/src/main/java/com/fsck/k9/view/MessageHeader.java +++ b/k9mail/src/main/java/com/fsck/k9/view/MessageHeader.java @@ -181,23 +181,12 @@ public class MessageHeader extends LinearLayout implements OnClickListener { Integer messageToShow = null; try { // Retrieve additional headers - boolean allHeadersDownloaded = mMessage.isSet(Flag.X_GOT_ALL_HEADERS); List additionalHeaders = getAdditionalHeaders(mMessage); if (!additionalHeaders.isEmpty()) { // Show the additional headers that we have got. populateAdditionalHeadersView(additionalHeaders); mAdditionalHeadersView.setVisibility(View.VISIBLE); - } - if (!allHeadersDownloaded) { - /* - * Tell the user about the "save all headers" setting - * - * NOTE: This is only a temporary solution... in fact, - * the system should download headers on-demand when they - * have not been saved in their entirety initially. - */ - messageToShow = R.string.message_additional_headers_not_downloaded; - } else if (additionalHeaders.isEmpty()) { + } else { // All headers have been downloaded, but there are no additional headers. messageToShow = R.string.message_no_additional_headers_available; }