准备换个实现
This commit is contained in:
parent
b4574f730d
commit
0e69ea1732
@ -264,6 +264,7 @@ public class MainConversationListAdapter extends ConversationListAdapter {
|
|||||||
|
|
||||||
|
|
||||||
private void bindEmpty(ViewHolder holder, int position) {
|
private void bindEmpty(ViewHolder holder, int position) {
|
||||||
|
Log.i("聊天数据源", "bindEmpty: ");
|
||||||
if (isChat) {
|
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.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);
|
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);
|
showData = UiConversationCodeUtil.FilterData(mFilter, tmp, allDataList);
|
||||||
} else {
|
} else {
|
||||||
allDataList = tmp;
|
allDataList = tmp;
|
||||||
if (mFilter != FILTER_OFFLINE)
|
if (mFilter != FILTER_OFFLINE && mFilter != FILTER_ONLINE )
|
||||||
{
|
{
|
||||||
Log.i("聊天数据源", "FilterData notSearch");
|
Log.i("聊天数据源", "FilterData notSearch");
|
||||||
showData = UiConversationCodeUtil.FilterData(mFilter, allDataList);
|
showData = UiConversationCodeUtil.FilterData(mFilter, allDataList);
|
||||||
|
@ -51,7 +51,7 @@ public class UiConversationCodeUtil {
|
|||||||
Conversation mCore = item.mCore;
|
Conversation mCore = item.mCore;
|
||||||
result = prime * result + ((mCore.getPortraitUrl() == null) ? 0 : mCore.getPortraitUrl().hashCode());
|
result = prime * result + ((mCore.getPortraitUrl() == null) ? 0 : mCore.getPortraitUrl().hashCode());
|
||||||
result = prime * result + ((mCore.getConversationTitle() == null) ? 0 : mCore.getConversationTitle().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 + (int) (mCore.getSentTime() ^ (mCore.getSentTime() >>> 32));
|
||||||
result = prime * result + ((mCore.getDraft() == null) ? 0 : mCore.getDraft().hashCode());
|
result = prime * result + ((mCore.getDraft() == null) ? 0 : mCore.getDraft().hashCode());
|
||||||
result = prime * result + mCore.getUnreadMessageCount();
|
result = prime * result + mCore.getUnreadMessageCount();
|
||||||
@ -146,7 +146,7 @@ private static boolean isContains(List<BaseUiConversation> list, BaseUiConversat
|
|||||||
List<BaseUiConversation> showData = new ArrayList<>();
|
List<BaseUiConversation> showData = new ArrayList<>();
|
||||||
if (data == null || data.isEmpty())
|
if (data == null || data.isEmpty())
|
||||||
return showData;
|
return showData;
|
||||||
Log.i("MainConversationListAdapter", "FilterData: 源" + data.size());
|
Log.i("MainConversationListAdapter", "设置数据源 FilterData: 源" + data.size());
|
||||||
switch (filterType) {
|
switch (filterType) {
|
||||||
case FILTER_ALL:
|
case FILTER_ALL:
|
||||||
showData = data;
|
showData = data;
|
||||||
@ -187,7 +187,7 @@ private static boolean isContains(List<BaseUiConversation> list, BaseUiConversat
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Log.i("MainConversationListAdapter", "FilterData: 结果" + showData.size());
|
Log.i("MainConversationListAdapter", " 设置数据源 FilterData: 结果" + showData.size());
|
||||||
return showData;
|
return showData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user