From ecca0ca854312d7dfcbb52a139a145ffb368e3b6 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 6 Sep 2022 17:07:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E9=97=B4=E6=9D=A5=E6=B6=88=E6=81=AF=E6=98=BE=E7=A4=BA=E6=8C=87?= =?UTF-8?q?=E5=AF=BC=E5=91=98=E7=9A=84=E5=A4=B4=E5=83=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/live/views/LiveRoomViewHolder.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; + } + } } }