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);
}
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();
}
}
Aggregations