From 49c4115e46d57c3309887417ae20ea8e6ff05883 Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 6 Feb 2015 20:01:14 +0100 Subject: [PATCH] Refactor code; no functional changes --- .../com/fsck/k9/mailstore/LocalMessageExtractor.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/mailstore/LocalMessageExtractor.java b/k9mail/src/main/java/com/fsck/k9/mailstore/LocalMessageExtractor.java index c6c70ba2c..dabd69095 100644 --- a/k9mail/src/main/java/com/fsck/k9/mailstore/LocalMessageExtractor.java +++ b/k9mail/src/main/java/com/fsck/k9/mailstore/LocalMessageExtractor.java @@ -448,18 +448,20 @@ public class LocalMessageExtractor { attachments); List attachmentInfos = extractAttachmentInfos(context, attachments); - if (pgpAnnotation != NO_ANNOTATIONS) { + MessageViewContainer messageViewContainer; + if (pgpAnnotation == NO_ANNOTATIONS) { + messageViewContainer = new MessageViewContainer(viewable.html, attachmentInfos); + } else { OpenPgpSignatureResult pgpResult = pgpAnnotation.getSignatureResult(); OpenPgpError pgpError = pgpAnnotation.getError(); boolean wasEncrypted = pgpAnnotation.wasEncrypted(); PendingIntent pendingIntent = pgpAnnotation.getPendingIntent(); - containers.add(new MessageViewContainer( - viewable.html, attachmentInfos, pgpResult, pgpError, wasEncrypted, pendingIntent)); - } else { - containers.add(new MessageViewContainer(viewable.html, attachmentInfos)); + messageViewContainer = new MessageViewContainer(viewable.html, attachmentInfos, pgpResult, pgpError, + wasEncrypted, pendingIntent); } + containers.add(messageViewContainer); } return new MessageViewInfo(containers, message);