For now always show contact picture in message view

This commit is contained in:
cketti 2022-09-15 12:30:33 +02:00
parent d585e2b548
commit a31db513b9

View file

@ -17,7 +17,6 @@ import androidx.appcompat.widget.PopupMenu;
import androidx.appcompat.widget.PopupMenu.OnMenuItemClickListener;
import com.fsck.k9.Account;
import com.fsck.k9.DI;
import com.fsck.k9.K9;
import com.fsck.k9.activity.misc.ContactPicture;
import com.fsck.k9.contacts.ContactPictureLoader;
import com.fsck.k9.helper.ClipboardManager;
@ -117,19 +116,13 @@ public class MessageHeader extends LinearLayout implements OnClickListener, OnLo
fromAddress = fromAddresses[0];
}
if (K9.isShowContactPicture()) {
contactBadge.setVisibility(View.VISIBLE);
if (fromAddress != null) {
contactBadge.setContact(fromAddress);
if (fromAddress != null) {
contactBadge.setContact(fromAddress);
ContactPictureLoader contactsPictureLoader = ContactPicture.getContactPictureLoader();
contactsPictureLoader.setContactPicture(contactBadge, fromAddress);
} else {
contactBadge.setImageResource(R.drawable.ic_contact_picture);
}
} else {
contactBadge.setVisibility(View.GONE);
ContactPictureLoader contactsPictureLoader = ContactPicture.getContactPictureLoader();
contactsPictureLoader.setContactPicture(contactBadge, fromAddress);
} else {
contactBadge.setImageResource(R.drawable.ic_contact_picture);
}
CharSequence from = messageHelper.getSenderDisplayName(fromAddress);