From 0e69ea1732792fc9f6b3f99871b6b87c9fa0fe48 Mon Sep 17 00:00:00 2001 From: ningwenqiang Date: Tue, 3 Sep 2024 09:51:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=87=86=E5=A4=87=E6=8D=A2=E4=B8=AA=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/adapter/MainConversationListAdapter.java | 3 ++- .../com/yunbao/common/utils/UiConversationCodeUtil.java | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java b/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java index 57dd4836e..bc31d942c 100644 --- a/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java +++ b/common/src/main/java/com/yunbao/common/adapter/MainConversationListAdapter.java @@ -264,6 +264,7 @@ public class MainConversationListAdapter extends ConversationListAdapter { private void bindEmpty(ViewHolder holder, int position) { + Log.i("聊天数据源", "bindEmpty: "); if (isChat) { ViewUtils.findViewById(holder.itemView, R.id.imageView, ImageView.class).setImageResource(R.mipmap.ic_message_not_chat_list); ViewUtils.findViewById(holder.itemView, R.id.textView, TextView.class).setText(R.string.not_data_message_chat_list); @@ -335,7 +336,7 @@ public class MainConversationListAdapter extends ConversationListAdapter { showData = UiConversationCodeUtil.FilterData(mFilter, tmp, allDataList); } else { allDataList = tmp; - if (mFilter != FILTER_OFFLINE) + if (mFilter != FILTER_OFFLINE && mFilter != FILTER_ONLINE ) { Log.i("聊天数据源", "FilterData notSearch"); showData = UiConversationCodeUtil.FilterData(mFilter, allDataList); diff --git a/common/src/main/java/com/yunbao/common/utils/UiConversationCodeUtil.java b/common/src/main/java/com/yunbao/common/utils/UiConversationCodeUtil.java index a22e6e12a..6662ceefb 100644 --- a/common/src/main/java/com/yunbao/common/utils/UiConversationCodeUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/UiConversationCodeUtil.java @@ -51,7 +51,7 @@ public class UiConversationCodeUtil { Conversation mCore = item.mCore; result = prime * result + ((mCore.getPortraitUrl() == null) ? 0 : mCore.getPortraitUrl().hashCode()); result = prime * result + ((mCore.getConversationTitle() == null) ? 0 : mCore.getConversationTitle().hashCode()); - result = prime * result + ((item.mConversationContent == null) ? 0 : item.mConversationContent.hashCode()); + // result = prime * result + ((item.mConversationContent == null) ? 0 : item.mConversationContent.hashCode()); result = prime * result + (int) (mCore.getSentTime() ^ (mCore.getSentTime() >>> 32)); result = prime * result + ((mCore.getDraft() == null) ? 0 : mCore.getDraft().hashCode()); result = prime * result + mCore.getUnreadMessageCount(); @@ -146,7 +146,7 @@ private static boolean isContains(List list, BaseUiConversat List showData = new ArrayList<>(); if (data == null || data.isEmpty()) return showData; - Log.i("MainConversationListAdapter", "FilterData: 源" + data.size()); + Log.i("MainConversationListAdapter", "设置数据源 FilterData: 源" + data.size()); switch (filterType) { case FILTER_ALL: showData = data; @@ -187,7 +187,7 @@ private static boolean isContains(List list, BaseUiConversat } break; } - Log.i("MainConversationListAdapter", "FilterData: 结果" + showData.size()); + Log.i("MainConversationListAdapter", " 设置数据源 FilterData: 结果" + showData.size()); return showData; }