mirror of https://github.com/M66B/FairEmail.git
Make contact photo invisible when not present in normal view
This commit is contained in:
parent
42114eb147
commit
498c9d351e
|
@ -349,14 +349,16 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|||
Log.e(Helper.TAG, ex + "\n" + Log.getStackTraceString(ex));
|
||||
}
|
||||
}
|
||||
if (!photo && identicons) {
|
||||
if (!photo && identicons && !outgoing) {
|
||||
if (message.from != null && message.from.length > 0) {
|
||||
ivAvatar.setImageBitmap(Identicon.generate(message.from[0].toString(), dp24, 5, "light".equals(theme)));
|
||||
photo = true;
|
||||
} else
|
||||
ivAvatar.setImageDrawable(null);
|
||||
}
|
||||
ivAvatar.setVisibility(photo ? View.VISIBLE : View.GONE);
|
||||
ivAvatar.setVisibility(photo
|
||||
? View.VISIBLE : compact || !(avatars || identicons) || outgoing ? View.GONE
|
||||
: View.INVISIBLE);
|
||||
|
||||
vwColor.setBackgroundColor(message.accountColor == null ? Color.TRANSPARENT : message.accountColor);
|
||||
|
||||
|
|
Loading…
Reference in New Issue