From f391d1bee7b241a9c123bfd68ca45ca24dacfb66 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 26 Mar 2024 10:25:03 +0800 Subject: [PATCH] =?UTF-8?q?fix=20[=E5=85=B3=E6=B3=A8=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=9C=89=E8=AF=AF]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MainMsgAddressBookListAdapter.java | 67 ++++++++++--------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java b/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java index 5379ad4f6..37e6ba6e1 100644 --- a/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/MainMsgAddressBookListAdapter.java @@ -1,8 +1,6 @@ package com.yunbao.main.adapter; import android.graphics.Color; -import android.text.Html; -import android.text.Spanned; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -13,12 +11,10 @@ import androidx.annotation.NonNull; import com.yunbao.common.bean.MessageChatUserBean; import com.yunbao.common.bean.SetAttentsModel; -import com.yunbao.common.bean.UserBean; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.utils.RouteUtil; -import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.main.R; @@ -27,17 +23,18 @@ import com.yunbao.main.fragment.MyAddressBookFragment; import java.util.ArrayList; import java.util.List; -import io.rong.imkit.conversationlist.ConversationListAdapter; -import io.rong.imkit.conversationlist.model.BaseUiConversation; -import io.rong.imkit.utils.RouteUtils; import io.rong.imkit.widget.adapter.BaseAdapter; import io.rong.imkit.widget.adapter.ViewHolder; -import io.rong.imlib.model.Conversation; public class MainMsgAddressBookListAdapter extends BaseAdapter { public static final int TYPE_SEARCH_TITLE = 500; public static final int TYPE_SEARCH_USER = 510; public static final int TYPE_SEARCH_CHAT = 520; + private com.yunbao.common.interfaces.OnItemClickListener onItemClickListener; + + public void setOnItemClickListener(com.yunbao.common.interfaces.OnItemClickListener onItemClickListener) { + this.onItemClickListener = onItemClickListener; + } @NonNull @Override @@ -74,7 +71,7 @@ public class MainMsgAddressBookListAdapter extends BaseAdapter { RouteUtil.forwardUserHome(mDataList.get(position).getId()); }); @@ -129,7 +137,7 @@ public class MainMsgAddressBookListAdapter extends BaseAdapter() { @Override public void onSuccess(SetAttentsModel data) { - bean.setType(MyAddressBookFragment.TYPE_MUTUAL); - btn.setEnabled(true); - btn.setTextColor(Color.parseColor("#333333")); - btn.setText(WordUtil.getNewString(R.string.activity_msg_addressbook_tab_mutual)); - btn.setBackgroundResource(R.drawable.bg_msg_address_book_user_btn_mutual); - btn.setTag(bean); - notifyDataSetChanged(); + /* bean.setAttention(Integer.parseInt(data.getIsattent())); + mDataList.set(position, bean); + notifyDataSetChanged();*/ + if (onItemClickListener != null) { + onItemClickListener.onItemClick(bean, -2); + } } @Override