From ef9c218f87000c8089058e87387e4e6e8aecedff Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Mon, 5 Sep 2022 14:54:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E9=99=A4=E5=85=A8=E9=83=A8=E6=9C=AA?= =?UTF-8?q?=E8=AF=BB=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/activity/PDLiveConversationListActivity.java | 8 ++++++-- .../manager/imrongcloud/ConversationIMListManager.java | 9 ++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java index 52838be86..221ef83f1 100644 --- a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationListActivity.java @@ -192,7 +192,7 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. container.post(new Runnable() { @Override public void run() { - showGuideView(); +// showGuideView(); } }); } @@ -418,7 +418,9 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. .setMessageReadAll(new com.yunbao.common.http.base.HttpCallback() { @Override public void onSuccess(String data) { - + textNewsNotice.setVisibility(View.GONE); + textNewsInteraction.setVisibility(View.GONE); + textNewsOnline.setVisibility(View.GONE); } @Override @@ -427,6 +429,8 @@ public class PDLiveConversationListActivity extends AbsActivity implements View. } }); // IMCenter.getInstance().clearMessagesUnreadStatus(); + MessageIMManager.get(mContext).setSystemNumber(0); + EventBus.getDefault().post(new MessageIMEvent().setNumber(0)); } @Override diff --git a/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java b/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java index 3fd397107..454768faa 100644 --- a/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java +++ b/main/src/main/java/com/yunbao/main/manager/imrongcloud/ConversationIMListManager.java @@ -286,11 +286,11 @@ public class ConversationIMListManager { RongIMClient.getInstance().getConversationListByPage(new RongIMClient.ResultCallback>() { @Override public void onSuccess(List conversations) { - if (conversations.size() < 10) { + if (conversations != null && conversations.size() < 10) { if (!clearMessages) { for (Conversation conversation : conversations) { UserInfo userInfo = RongUserInfoManager.getInstance().getUserInfo(conversation.getTargetId()); - if (!TextUtils.isEmpty(userInfo.getExtra())) { + if (userInfo != null && !TextUtils.isEmpty(userInfo.getExtra())) { IMLoginModel model = GsonUtils.fromJson(userInfo.getExtra(), IMLoginModel.class); if (TextUtils.equals(model.getIsAdmin(), "1")) { targetId = userInfo.getUserId(); @@ -299,11 +299,10 @@ public class ConversationIMListManager { } } else { for (Conversation conversation : conversations) { - RongIMClient.getInstance() + IMCenter.getInstance() .clearMessagesUnreadStatus( Conversation.ConversationType.PRIVATE, - conversation.getTargetId(), - conversation.getSentTime(), null); + conversation.getTargetId(), null); } }