修改测试问题,shouye ytuijian
This commit is contained in:
@@ -37,6 +37,7 @@ public class SystemChatMessageAdapter extends RecyclerView.Adapter {
|
||||
private List<ImUserBean> listUserBean = new ArrayList<>();
|
||||
protected Activity mContext;
|
||||
protected LayoutInflater mInflater;
|
||||
private String type = "";
|
||||
|
||||
public SystemChatMessageAdapter(Activity mContext) {
|
||||
this.mContext = mContext;
|
||||
@@ -76,6 +77,7 @@ public class SystemChatMessageAdapter extends RecyclerView.Adapter {
|
||||
}
|
||||
//系统消息的跳转
|
||||
messageViewHolder.setViewHolderOnClickListener((view, model1) -> {
|
||||
type = model1.getType();
|
||||
//获取一下系统通知
|
||||
MessageIMManager.get(mContext).getSystemMessages(new MessageIMManager.SystemMessagesHttpCallback() {
|
||||
@Override
|
||||
@@ -91,11 +93,6 @@ public class SystemChatMessageAdapter extends RecyclerView.Adapter {
|
||||
AppEventsLogger.newLogger(mContext).logEvent("FB_customer_service");
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("ww5z2p");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
} else if (model1.getContent().equals("新手指導員")) {
|
||||
FirebaseAnalytics.getInstance(mContext).logEvent("FS_guide", null);
|
||||
AppEventsLogger.newLogger(mContext).logEvent("FB_guide", null);
|
||||
AdjustEvent adjustEvent1 = new AdjustEvent("m0nfpn");
|
||||
Adjust.trackEvent(adjustEvent1);
|
||||
}
|
||||
if (!TextUtils.isEmpty(model1.getLink())) {
|
||||
mContext.startActivity(new Intent(mContext, WebViewActivity.class).putExtra("url", model1.getLink()));
|
||||
@@ -146,11 +143,13 @@ public class SystemChatMessageAdapter extends RecyclerView.Adapter {
|
||||
listUserBean.clear();
|
||||
listUserBean.addAll(mlistUserBean);
|
||||
notifyDataSetChanged();
|
||||
|
||||
int systemNumber = 0;
|
||||
for (ImUserBean bean : listUserBean) {
|
||||
//未读消息数
|
||||
String number = bean.getNum();
|
||||
if (TextUtils.equals(type, bean.getType())) {
|
||||
number = null;
|
||||
}
|
||||
//未读消息不为空并且大于0
|
||||
try {
|
||||
if (!TextUtils.isEmpty(number) && Integer.parseInt(number) > 0) {
|
||||
@@ -160,7 +159,7 @@ public class SystemChatMessageAdapter extends RecyclerView.Adapter {
|
||||
systemNumber = systemNumber + 0;
|
||||
}
|
||||
}
|
||||
type = null;
|
||||
MessageIMManager.get(mContext).setSystemNumber(systemNumber);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,12 @@
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="centerCrop" />
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_new"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="22dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:visibility="visible" />
|
||||
</RelativeLayout>
|
||||
|
||||
<LinearLayout
|
||||
@@ -35,9 +40,9 @@
|
||||
android:layout_marginStart="15dp"
|
||||
android:layout_marginTop="@dimen/rc_margin_size_16"
|
||||
android:layout_marginEnd="@dimen/rc_margin_size_12"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintEnd_toStartOf="@+id/rc_conversation_date"
|
||||
app:layout_constraintStart_toEndOf="@+id/rc_conversation_portrait_rl"
|
||||
android:gravity="center_vertical"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
@@ -51,12 +56,7 @@
|
||||
android:textColor="@color/rc_text_main_color"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_new"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user