Merge pull request #827 from k9mail/GH-604_always_load_headers
Always load headers when fetching a message from LocalStore
This commit is contained in:
commit
86d7a17466
2 changed files with 7 additions and 3 deletions
|
@ -652,6 +652,7 @@ public class LocalFolder extends Folder<LocalMessage> implements Serializable {
|
|||
LocalMessage localMessage = (LocalMessage) message;
|
||||
|
||||
loadMessageParts(db, localMessage);
|
||||
localMessage.loadHeadersIfNecessary();
|
||||
}
|
||||
}
|
||||
} catch (MessagingException e) {
|
||||
|
|
|
@ -17,10 +17,7 @@ import com.fsck.k9.mail.Address;
|
|||
import com.fsck.k9.mail.Flag;
|
||||
import com.fsck.k9.mail.Folder;
|
||||
import com.fsck.k9.mail.MessagingException;
|
||||
import com.fsck.k9.mail.Part;
|
||||
import com.fsck.k9.mail.internet.MessageExtractor;
|
||||
import com.fsck.k9.mail.internet.MimeMessage;
|
||||
import com.fsck.k9.mail.internet.MimeUtility;
|
||||
import com.fsck.k9.mailstore.LockableDatabase.DbCallback;
|
||||
import com.fsck.k9.mailstore.LockableDatabase.WrappedException;
|
||||
|
||||
|
@ -453,6 +450,12 @@ public class LocalMessage extends MimeMessage {
|
|||
getFolder().populateHeaders(this);
|
||||
}
|
||||
|
||||
void loadHeadersIfNecessary() throws MessagingException {
|
||||
if (!mHeadersLoaded) {
|
||||
loadHeaders();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setHeader(String name, String value) throws MessagingException {
|
||||
if (!mHeadersLoaded)
|
||||
|
|
Loading…
Reference in a new issue