|
|
@ -923,7 +923,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
if (amessage == null || !amessage.id.equals(id))
|
|
|
|
if (amessage == null || !amessage.id.equals(id))
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
bindContactInfo(info, message);
|
|
|
|
bindContactInfo(info, addresses, name_email);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -932,7 +932,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}.setLog(false).execute(context, owner, aargs, "message:avatar");
|
|
|
|
}.setLog(false).execute(context, owner, aargs, "message:avatar");
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
bindContactInfo(info, message);
|
|
|
|
bindContactInfo(info, addresses, name_email);
|
|
|
|
|
|
|
|
|
|
|
|
if (viewType == ViewType.THREAD)
|
|
|
|
if (viewType == ViewType.THREAD)
|
|
|
|
if (expanded)
|
|
|
|
if (expanded)
|
|
|
@ -1045,7 +1045,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
ibFlagged.setVisibility(View.GONE);
|
|
|
|
ibFlagged.setVisibility(View.GONE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void bindContactInfo(ContactInfo info, TupleMessageEx message) {
|
|
|
|
private void bindContactInfo(ContactInfo info, Address[] addresses, boolean name_email) {
|
|
|
|
if (info.hasPhoto()) {
|
|
|
|
if (info.hasPhoto()) {
|
|
|
|
ibAvatar.setImageBitmap(info.getPhotoBitmap());
|
|
|
|
ibAvatar.setImageBitmap(info.getPhotoBitmap());
|
|
|
|
ibAvatar.setVisibility(View.VISIBLE);
|
|
|
|
ibAvatar.setVisibility(View.VISIBLE);
|
|
|
@ -1056,6 +1056,20 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
|
|
|
|
ibAvatar.setTag(lookupUri);
|
|
|
|
ibAvatar.setTag(lookupUri);
|
|
|
|
ibAvatar.setEnabled(lookupUri != null);
|
|
|
|
ibAvatar.setEnabled(lookupUri != null);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (addresses != null && addresses.length == 1) {
|
|
|
|
|
|
|
|
String displayName = info.getDisplayName();
|
|
|
|
|
|
|
|
if (!TextUtils.isEmpty(displayName)) {
|
|
|
|
|
|
|
|
String personal = ((InternetAddress) addresses[0]).getPersonal();
|
|
|
|
|
|
|
|
if (TextUtils.isEmpty(personal))
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
((InternetAddress) addresses[0]).setPersonal(displayName);
|
|
|
|
|
|
|
|
tvFrom.setText(MessageHelper.formatAddresses(addresses, name_email, false));
|
|
|
|
|
|
|
|
} catch (UnsupportedEncodingException ex) {
|
|
|
|
|
|
|
|
Log.w(ex);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (distinguish_contacts && info.isKnown())
|
|
|
|
if (distinguish_contacts && info.isKnown())
|
|
|
|
tvFrom.setPaintFlags(tvFrom.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
|
|
|
tvFrom.setPaintFlags(tvFrom.getPaintFlags() | Paint.UNDERLINE_TEXT_FLAG);
|
|
|
|
}
|
|
|
|
}
|
|
|
|