Search in sources :

Example 26 with MessageViewInfo

use of com.fsck.k9.mailstore.MessageViewInfo in project k-9 by k9mail.

the class MessageTopView method showMessage.

public void showMessage(Account account, MessageViewInfo messageViewInfo) {
    resetAndPrepareMessageView(messageViewInfo);
    ShowPictures showPicturesSetting = account.getShowPictures();
    boolean loadPictures = shouldAutomaticallyLoadPictures(showPicturesSetting, messageViewInfo.message) || showPicturesButtonClicked;
    MessageContainerView view = (MessageContainerView) mInflater.inflate(R.layout.message_container, containerView, false);
    containerView.addView(view);
    boolean hideUnsignedTextDivider = account.isOpenPgpHideSignOnly();
    view.displayMessageViewContainer(messageViewInfo, new OnRenderingFinishedListener() {

        @Override
        public void onLoadFinished() {
            displayViewOnLoadFinished(true);
        }
    }, loadPictures, hideUnsignedTextDivider, attachmentCallback);
    if (view.hasHiddenExternalImages() && !showPicturesButtonClicked) {
        showShowPicturesButton();
    }
}
Also used : OnRenderingFinishedListener(com.fsck.k9.ui.messageview.MessageContainerView.OnRenderingFinishedListener) ShowPictures(com.fsck.k9.Account.ShowPictures)

Aggregations

Message (com.fsck.k9.mail.Message)14 MimeMessage (com.fsck.k9.mail.internet.MimeMessage)14 K9RobolectricTest (com.fsck.k9.K9RobolectricTest)10 Test (org.junit.Test)10 MimeBodyPart (com.fsck.k9.mail.internet.MimeBodyPart)8 LocalMessage (com.fsck.k9.mailstore.LocalMessage)5 BodyPart (com.fsck.k9.mail.BodyPart)4 Part (com.fsck.k9.mail.Part)4 MessageFormat (com.fsck.k9.Account.MessageFormat)2 MessageReference (com.fsck.k9.controller.MessageReference)2 MessagingException (com.fsck.k9.mail.MessagingException)2 SimpleMessageFormat (com.fsck.k9.message.SimpleMessageFormat)2 ArrayList (java.util.ArrayList)2 Drawable (android.graphics.drawable.Drawable)1 Uri (android.net.Uri)1 WorkerThread (android.support.annotation.WorkerThread)1 UiThread (androidx.annotation.UiThread)1 WorkerThread (androidx.annotation.WorkerThread)1 Account (com.fsck.k9.Account)1 ShowPictures (com.fsck.k9.Account.ShowPictures)1