mirror of https://github.com/M66B/FairEmail.git
Fixed empty avatar when disabled
This commit is contained in:
parent
124a86aac8
commit
5fb6e47741
|
@ -845,6 +845,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
tvFolder.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize * 0.9f);
|
tvFolder.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize * 0.9f);
|
||||||
tvPreview.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize * 0.9f);
|
tvPreview.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize * 0.9f);
|
||||||
|
|
||||||
|
if (avatars) {
|
||||||
int px = Math.round(fz_sender + fz_subject + (compact ? 0 : textSize * 0.9f));
|
int px = Math.round(fz_sender + fz_subject + (compact ? 0 : textSize * 0.9f));
|
||||||
ViewGroup.LayoutParams lparams = ibAvatar.getLayoutParams();
|
ViewGroup.LayoutParams lparams = ibAvatar.getLayoutParams();
|
||||||
if (lparams.height != px) {
|
if (lparams.height != px) {
|
||||||
|
@ -853,6 +854,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
ibAvatar.requestLayout();
|
ibAvatar.requestLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Selected / disabled
|
// Selected / disabled
|
||||||
view.setActivated(selectionTracker != null && selectionTracker.isSelected(message.id));
|
view.setActivated(selectionTracker != null && selectionTracker.isSelected(message.id));
|
||||||
|
@ -1297,6 +1299,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
for (ContactInfo c : info)
|
for (ContactInfo c : info)
|
||||||
map.put(c.getEmailAddress(), c);
|
map.put(c.getEmailAddress(), c);
|
||||||
|
|
||||||
|
if (avatars) {
|
||||||
ContactInfo main = null;
|
ContactInfo main = null;
|
||||||
if (senders != null && senders.length > 0) {
|
if (senders != null && senders.length > 0) {
|
||||||
String email = ((InternetAddress) senders[0]).getAddress();
|
String email = ((InternetAddress) senders[0]).getAddress();
|
||||||
|
@ -1315,6 +1318,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
||||||
ibAvatar.setEnabled(lookupUri != null);
|
ibAvatar.setEnabled(lookupUri != null);
|
||||||
}
|
}
|
||||||
ibAvatar.setVisibility(main == null ? View.GONE : View.VISIBLE);
|
ibAvatar.setVisibility(main == null ? View.GONE : View.VISIBLE);
|
||||||
|
}
|
||||||
|
|
||||||
Address[] _senders = fillIn(senders, map);
|
Address[] _senders = fillIn(senders, map);
|
||||||
Address[] _recipients = fillIn(recipients, map);
|
Address[] _recipients = fillIn(recipients, map);
|
||||||
|
|
Loading…
Reference in New Issue