|
@@ -99,17 +99,18 @@ public class MessageListAdapter extends BaseQuickAdapter<ConversationListVo, Bas
|
|
|
Conversation conversation = vo.getConversation();
|
|
|
if (conversation == null) return;
|
|
|
TextView tvCount = helper.getView(R.id.tv_item_msg_count);
|
|
|
- getUnReadCount(conversation.getConversationType(), conversation.getTargetId(), tvCount);
|
|
|
+ getUnReadCount(conversation, tvCount);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- public void getUnReadCount(Conversation.ConversationType type, String id, TextView tvCount) {
|
|
|
+ private void getUnReadCount(Conversation conversation, TextView tvCount) {
|
|
|
if (!AppManager.get().isConnectRongCloud()) return;
|
|
|
- RongIMClient.getInstance().getUnreadCount(type, id, new RongIMClient.ResultCallback<Integer>() {
|
|
|
+ RongIMClient.getInstance().getUnreadCount(conversation.getConversationType(), conversation.getTargetId(), new RongIMClient.ResultCallback<Integer>() {
|
|
|
@Override
|
|
|
public void onSuccess(Integer count) {
|
|
|
if (count != null) {
|
|
|
+ conversation.setUnreadMessageCount(count);
|
|
|
String num;
|
|
|
if (count > 99) {
|
|
|
num = "99+";
|