diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index 2b063007d..b1f954f88 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1799,10 +1799,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis @Override public void onSuccess(List conversations) { if (conversations != null && !conversations.isEmpty()) { - Conversation conversation = conversations.get(0); - UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(conversation.getTargetId()); - if (userInfo != null) { - ImgLoader.display(mContext, userInfo.getPortraitUri().toString(), msgUserIcon); + for (Conversation conversation : conversations) { + if(conversation.getUnreadMessageCount()!=0){ + UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(conversation.getTargetId()); + if (userInfo != null) { + ImgLoader.display(mContext, userInfo.getPortraitUri().toString(), msgUserIcon); + } + break; + } + } } }