fix:修复直播间来消息显示指导员的头像

This commit is contained in:
zlzw 2022-09-06 17:07:43 +08:00
parent 50e5dbfeca
commit ecca0ca854

View File

@ -1799,10 +1799,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
@Override @Override
public void onSuccess(List<Conversation> conversations) { public void onSuccess(List<Conversation> conversations) {
if (conversations != null && !conversations.isEmpty()) { if (conversations != null && !conversations.isEmpty()) {
Conversation conversation = conversations.get(0); for (Conversation conversation : conversations) {
UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(conversation.getTargetId()); if(conversation.getUnreadMessageCount()!=0){
if (userInfo != null) { UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(conversation.getTargetId());
ImgLoader.display(mContext, userInfo.getPortraitUri().toString(), msgUserIcon); if (userInfo != null) {
ImgLoader.display(mContext, userInfo.getPortraitUri().toString(), msgUserIcon);
}
break;
}
} }
} }
} }