From 85a7a08e9a7b7379f066324a12140473aac078f5 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 28 Dec 2010 09:08:18 +0000 Subject: [PATCH] Rename our attachment view holder from Attachment to AttachmentViewHolder --- src/com/fsck/k9/activity/MessageView.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/com/fsck/k9/activity/MessageView.java b/src/com/fsck/k9/activity/MessageView.java index ce9e5ebf2..3a45bd0e6 100644 --- a/src/com/fsck/k9/activity/MessageView.java +++ b/src/com/fsck/k9/activity/MessageView.java @@ -429,7 +429,7 @@ public class MessageView extends K9Activity implements OnClickListener { for (int i = 0, count = mAttachments.getChildCount(); i < count; i++) { - Attachment attachment = (Attachment) mAttachments.getChildAt(i).getTag(); + AttachmentViewHolder attachment = (AttachmentViewHolder) mAttachments.getChildAt(i).getTag(); attachment.viewButton.setEnabled(enabled); attachment.downloadButton.setEnabled(enabled); } @@ -709,7 +709,7 @@ public class MessageView extends K9Activity implements OnClickListener } } - static class Attachment + static class AttachmentViewHolder { public String name; public String contentType; @@ -1585,7 +1585,7 @@ public class MessageView extends K9Activity implements OnClickListener mListener); } - private void onDownloadAttachment(Attachment attachment) + private void onDownloadAttachment(AttachmentViewHolder attachment) { if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) { @@ -1609,7 +1609,7 @@ public class MessageView extends K9Activity implements OnClickListener } } - private void onViewAttachment(Attachment attachment) + private void onViewAttachment(AttachmentViewHolder attachment) { if (mMessage != null) { @@ -1685,10 +1685,10 @@ public class MessageView extends K9Activity implements OnClickListener onPrevious(); break; case R.id.download: - onDownloadAttachment((Attachment) view.getTag()); + onDownloadAttachment((AttachmentViewHolder) view.getTag()); break; case R.id.view: - onViewAttachment((Attachment) view.getTag()); + onViewAttachment((AttachmentViewHolder) view.getTag()); break; case R.id.show_pictures: onShowPictures(); @@ -1826,7 +1826,7 @@ public class MessageView extends K9Activity implements OnClickListener } } - private Bitmap getPreviewIcon(Attachment attachment) + private Bitmap getPreviewIcon(AttachmentViewHolder attachment) { try { @@ -1869,7 +1869,7 @@ public class MessageView extends K9Activity implements OnClickListener * We're guaranteed size because LocalStore.fetch puts it there. */ int size = Integer.parseInt(MimeUtility.getHeaderParameter(contentDisposition, "size")); - Attachment attachment = new Attachment(); + AttachmentViewHolder attachment = new AttachmentViewHolder(); attachment.size = size; String mimeType = part.getMimeType(); if (MimeUtility.DEFAULT_ATTACHMENT_MIME_TYPE.equals(mimeType)) @@ -2172,7 +2172,7 @@ public class MessageView extends K9Activity implements OnClickListener mHandler.progress(false); Object[] params = (Object[]) tag; boolean download = (Boolean) params[0]; - Attachment attachment = (Attachment) params[1]; + AttachmentViewHolder attachment = (AttachmentViewHolder) params[1]; if (download) { try