1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-25 00:58:50 -05:00

Small code cleanup

This commit is contained in:
cketti 2012-02-22 22:56:05 +01:00
parent 0ef9c516be
commit 2b54599c2b
2 changed files with 6 additions and 7 deletions

View File

@ -977,10 +977,7 @@ public class MessageView extends K9Activity implements OnClickListener {
}
if (resetMessageViewState) {
mMessageView.showMessageWebView(true);
mMessageView.showAttachments(false);
mMessageView.showShowAttachmentsAction(hasAttachments);
mMessageView.showShowMessageAction(false);
mMessageView.onShowMessage();
}
} catch (MessagingException e) {

View File

@ -43,6 +43,7 @@ public class SingleMessageView extends LinearLayout implements OnClickListener {
private View mShowMessageAction;
private View mShowAttachmentsAction;
private boolean mShowPictures;
private boolean mHasAttachments;
private Button mDownloadRemainder;
private LayoutInflater mInflater;
private Contacts mContacts;
@ -134,14 +135,14 @@ public class SingleMessageView extends LinearLayout implements OnClickListener {
mHiddenAttachments.setVisibility(View.VISIBLE);
}
private void onShowMessage() {
public void onShowMessage() {
showShowMessageAction(false);
showAttachments(false);
showShowAttachmentsAction(mHasAttachments);
showMessageWebView(true);
showShowAttachmentsAction(true);
}
private void onShowAttachments() {
public void onShowAttachments() {
showMessageWebView(false);
showShowAttachmentsAction(false);
showShowMessageAction(true);
@ -290,6 +291,7 @@ public class SingleMessageView extends LinearLayout implements OnClickListener {
showShowPicturesAction(true);
}
}
mHasAttachments = ((LocalStore.LocalMessage) message).hasAttachments();
} else {
loadBodyFromUrl("file:///android_asset/empty.html");
}