After we download attachments, get rid of the "old" attachment views
This commit is contained in:
parent
2ee5b49cf2
commit
6ef923be91
2 changed files with 20 additions and 0 deletions
|
@ -194,5 +194,6 @@
|
|||
<Button android:id="@+id/download_remainder"
|
||||
android:text="@string/message_view_download_remainder"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:layout_width="fill_parent" />
|
||||
</merge>
|
||||
|
|
|
@ -326,6 +326,22 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||
});
|
||||
}
|
||||
|
||||
public void removeAllAttachments()
|
||||
{
|
||||
runOnUiThread(new Runnable()
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
for (int i = 0, count = mAttachments.getChildCount(); i < count; i++)
|
||||
{
|
||||
mAttachments.removeView(mAttachments.getChildAt(i));
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public void setAttachmentsEnabled(final boolean enabled)
|
||||
{
|
||||
runOnUiThread(new Runnable()
|
||||
|
@ -1966,6 +1982,9 @@ public class MessageView extends K9Activity implements OnClickListener
|
|||
|
||||
MessageView.this.mMessage = message;
|
||||
|
||||
|
||||
mHandler.removeAllAttachments();
|
||||
|
||||
String text;
|
||||
Part part = MimeUtility.findFirstPartByMimeType(mMessage, "text/html");
|
||||
if (part == null)
|
||||
|
|
Loading…
Reference in a new issue