修改测试问题,shouye ytuijian

This commit is contained in:
18401019693 2022-08-10 15:29:41 +08:00
parent 8c6b04685a
commit 7bb3f2d5f7
3 changed files with 8 additions and 8 deletions

View File

@ -149,6 +149,7 @@ public class SystemChatMessageAdapter extends RecyclerView.Adapter {
String number = bean.getNum();
if (TextUtils.equals(type, bean.getType())) {
number = null;
bean.setNum(null);
}
//未读消息不为空并且大于0
try {
@ -160,6 +161,7 @@ public class SystemChatMessageAdapter extends RecyclerView.Adapter {
}
}
type = null;
notifyDataSetChanged();
MessageIMManager.get(mContext).setSystemNumber(systemNumber);
}
}

View File

@ -93,10 +93,11 @@ public class SearchResultsItemAdapter extends RecyclerView.Adapter {
if (mLists.size() > 1) {
isAll = true;
if (mLists.get(0).size() == 0) {
this.type = ANCHOR;
this.type = USER;
}
if (mLists.get(1).size() == 0) {
this.type = USER;
this.type = ANCHOR;
}
} else {
isAll = false;

View File

@ -39,7 +39,6 @@ public class SystemMessageAdapter extends RecyclerView.Adapter {
protected Activity mContext;
protected LayoutInflater mInflater;
private Handler netHandler = new Handler();
private int mPosition = -1;
private String type = "";
public SystemMessageAdapter(Activity mContext) {
@ -88,7 +87,6 @@ public class SystemMessageAdapter extends RecyclerView.Adapter {
//系统消息的跳转
messageViewHolder.setViewHolderOnClickListener((view, model1) -> {
type = model1.getType();
mPosition = position;
netHandler.post(updataRunable);
if (model1.getTitle().equals("在線客服")) {
FirebaseAnalytics.getInstance(mContext).logEvent("FS_customer_service", null);
@ -143,18 +141,16 @@ public class SystemMessageAdapter extends RecyclerView.Adapter {
//倒序展示
Collections.reverse(mlistUserBean);
listUserBean.clear();
if (mPosition > 0) {
mlistUserBean.get(mPosition).setNum("");
}
listUserBean.addAll(mlistUserBean);
notifyDataSetChanged();
mPosition = -1;
int systemNumber = 0;
for (ImUserBean bean : listUserBean) {
//未读消息数
String number = bean.getNum();
if (TextUtils.equals(type, bean.getType())) {
number = null;
bean.setNum(null);
}
//未读消息不为空并且大于0
try {
@ -166,6 +162,7 @@ public class SystemMessageAdapter extends RecyclerView.Adapter {
}
}
type = null;
notifyDataSetChanged();
MessageIMManager.get(mContext).setSystemNumber(systemNumber);
}