Search in sources :

Example 1 with ShowPictures

use of com.fsck.k9.Account.ShowPictures in project k-9 by k9mail.

the class MessageTopView method shouldShowPicturesFromSender.

private boolean shouldShowPicturesFromSender(ShowPictures showPicturesSetting, Message message) {
    if (showPicturesSetting != ShowPictures.ONLY_FROM_CONTACTS) {
        return false;
    }
    String senderEmailAddress = getSenderEmailAddress(message);
    if (senderEmailAddress == null) {
        return false;
    }
    Contacts contacts = Contacts.getInstance(getContext());
    return contacts.isInContacts(senderEmailAddress);
}
Also used : Contacts(com.fsck.k9.helper.Contacts)

Example 2 with ShowPictures

use of com.fsck.k9.Account.ShowPictures 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 automaticallyLoadPictures = shouldAutomaticallyLoadPictures(showPicturesSetting, messageViewInfo.message);
    MessageContainerView view = (MessageContainerView) mInflater.inflate(R.layout.message_container, containerView, false);
    containerView.addView(view);
    boolean hideUnsignedTextDivider = !K9.getOpenPgpSupportSignOnly();
    view.displayMessageViewContainer(messageViewInfo, new OnRenderingFinishedListener() {

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

Aggregations

ShowPictures (com.fsck.k9.Account.ShowPictures)1 Contacts (com.fsck.k9.helper.Contacts)1 OnRenderingFinishedListener (com.fsck.k9.ui.messageview.MessageContainerView.OnRenderingFinishedListener)1