From 4337f0bdd665975c4f4fc66409769a3031d611db Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 26 Mar 2024 10:35:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E8=9E=8D=E4=BA=91sdk?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/common/bean/MessageUserInfoBean.java | 10 ++++++++++ .../yunbao/common/dialog/MessageSayHiNotifyDialog.java | 4 ++++ .../yunbao/main/fragment/MyAddressBookFragment.java | 8 ++++++++ .../main/utils/PDLiveCustomConversationProvider.java | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java b/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java index 797d279e2..5bc50c48d 100644 --- a/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java +++ b/common/src/main/java/com/yunbao/common/bean/MessageUserInfoBean.java @@ -14,9 +14,19 @@ public class MessageUserInfoBean extends BaseModel{ @SerializedName("msg") String sayHiMsg; + int id; + int status; //0 需要跳转到 编辑资料页面 String extras; + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + public String getExtras() { return extras; } diff --git a/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java b/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java index f0530862d..d5f8adf05 100644 --- a/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java @@ -87,6 +87,10 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow { @Override protected void onCreate() { super.onCreate(); + if(userInfoBean.getId()==0){ + dismiss(); + return; + } findViewById(R.id.liveGo).setOnClickListener(v -> { isSayHi = true; Conversation.ConversationType type = Conversation.ConversationType.PRIVATE; diff --git a/main/src/main/java/com/yunbao/main/fragment/MyAddressBookFragment.java b/main/src/main/java/com/yunbao/main/fragment/MyAddressBookFragment.java index dae329343..8a7b047fe 100644 --- a/main/src/main/java/com/yunbao/main/fragment/MyAddressBookFragment.java +++ b/main/src/main/java/com/yunbao/main/fragment/MyAddressBookFragment.java @@ -66,6 +66,14 @@ public class MyAddressBookFragment extends Fragment { if(emptyView!=null){ mAdapter.setEmptyView(emptyView); } + mAdapter.setOnItemClickListener(new OnItemClickListener() { + @Override + public void onItemClick(MessageChatUserBean bean, int position) { + if(position==-2){ + initData(); + } + } + }); this.mList = (RecyclerView) view.findViewById(R.id.rc_conversation_list); this.mRefreshLayout = (SmartRefreshLayout) view.findViewById(R.id.rc_refresh); LinearLayoutManager layoutManager = new LinearLayoutManager(this.getActivity()); diff --git a/main/src/main/java/com/yunbao/main/utils/PDLiveCustomConversationProvider.java b/main/src/main/java/com/yunbao/main/utils/PDLiveCustomConversationProvider.java index fa7b6fe5c..473cac8e3 100644 --- a/main/src/main/java/com/yunbao/main/utils/PDLiveCustomConversationProvider.java +++ b/main/src/main/java/com/yunbao/main/utils/PDLiveCustomConversationProvider.java @@ -71,7 +71,7 @@ public class PDLiveCustomConversationProvider extends BaseConversationProvider { String cn = WordUtil.getChineseString(def); String en = WordUtil.getEnglishString(def); String content = uiConversation.mConversationContent.toString(); - Log.i("列表----", "bindViewHolder: " + str + " | " + uiConversation.mConversationContent); + Log.i("列表----", "bindViewHolder: " + str + " | " + uiConversation.mConversationContent+" | "+WordUtil.isNewZh()); if (WordUtil.isNewZh()) { if (en.equals(content)) { uiConversation.mConversationContent = new SpannableString(WordUtil.getNewString(def));