diff --git a/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.java b/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.java index db95d3328..d5cf2f9d6 100644 --- a/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.java +++ b/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageContainerView.java @@ -82,16 +82,17 @@ public class MessageContainerView extends LinearLayout implements OnClickListene private ClipboardManager mClipboardManager; private String mText; private Map attachments = new HashMap(); - private boolean displayPgpData; + private boolean displayPgpHeader; private OpenPgpHeaderView openPgpHeaderView; public void initialize(AttachmentViewCallback attachmentCallback, - OpenPgpHeaderViewCallback openPgpHeaderViewCallback, boolean displayPgpData) { + OpenPgpHeaderViewCallback openPgpHeaderViewCallback, boolean displayPgpHeader) { Context context = getContext(); this.attachmentCallback = attachmentCallback; this.openPgpHeaderViewCallback = openPgpHeaderViewCallback; + this.displayPgpHeader = displayPgpHeader; mOpenPgpHeaderStub = (ViewStub) findViewById(R.id.openpgp_header_stub); mSidebar = findViewById(R.id.message_sidebar); @@ -118,9 +119,7 @@ public class MessageContainerView extends LinearLayout implements OnClickListene mInflater = LayoutInflater.from(context); mMessageContentView.setVisibility(View.VISIBLE); - this.displayPgpData = displayPgpData; - - if (displayPgpData) { + if (displayPgpHeader) { openPgpHeaderView = (OpenPgpHeaderView) mOpenPgpHeaderStub.inflate(); openPgpHeaderView.initialize(); } @@ -476,7 +475,7 @@ public class MessageContainerView extends LinearLayout implements OnClickListene } */ - if (displayPgpData) { + if (displayPgpHeader) { openPgpHeaderView.setOpenPgpData(messageViewContainer.signatureResult, messageViewContainer.encrypted, messageViewContainer.pgpPendingIntent); openPgpHeaderView.setCallback(openPgpHeaderViewCallback); diff --git a/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java b/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java index 379bae22e..ee3fa6cc2 100644 --- a/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java +++ b/k9mail/src/main/java/com/fsck/k9/ui/messageview/MessageTopView.java @@ -67,8 +67,8 @@ public class MessageTopView extends LinearLayout { for (MessageViewContainer container : messageViewInfo.containers) { MessageContainerView view = (MessageContainerView) mInflater.inflate(R.layout.message_container, null); - view.initialize(attachmentCallback, openPgpHeaderViewCallback, - !Account.NO_OPENPGP_PROVIDER.equals(account.getOpenPgpProvider())); + boolean displayPgpHeader = !Account.NO_OPENPGP_PROVIDER.equals(account.getOpenPgpProvider()); + view.initialize(attachmentCallback, openPgpHeaderViewCallback, displayPgpHeader); view.setMessageViewContainer(container); containerViews.addView(view);