From 7e6a296722331d236d4bdf7de1ee2a624013d20c Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 26 Mar 2024 16:30:48 +0800 Subject: [PATCH 1/6] =?UTF-8?q?update=20=E6=B7=B7=E6=B7=86=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/proguard-rules.pro | 5 ++++- app/tmp/full-r8-config.txt | 5 ++++- .../java/com/yunbao/common/manager/IMLoginManager.java | 8 ++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 6f4c447c6..33167f52e 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -194,9 +194,12 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode; -keep public class com.alibaba.android.arouter.facade.**{*;} -keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;} -# If you use the byType method to obtain Service, add the following rules to protect the interface: +# 如果使用了 byType 的方式获取 Service,需添加下面规则,保护接口 -keep interface * implements com.alibaba.android.arouter.facade.template.IProvider +# 如果使用了 单类注入,即不定义接口实现 IProvider,需添加下面规则,保护实现 +-keep class * implements com.alibaba.android.arouter.facade.template.IProvider + # If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation # -keep class * implements com.alibaba.android.arouter.facade.template.IProvider diff --git a/app/tmp/full-r8-config.txt b/app/tmp/full-r8-config.txt index bcc009643..b1bb41625 100644 --- a/app/tmp/full-r8-config.txt +++ b/app/tmp/full-r8-config.txt @@ -293,9 +293,12 @@ rx.internal.util.atomic.LinkedQueueNode* consumerNode; -keep public class com.alibaba.android.arouter.facade.**{*;} -keep class * implements com.alibaba.android.arouter.facade.template.ISyringe{*;} -# If you use the byType method to obtain Service, add the following rules to protect the interface: +# 如果使用了 byType 的方式获取 Service,需添加下面规则,保护接口 -keep interface * implements com.alibaba.android.arouter.facade.template.IProvider +# 如果使用了 单类注入,即不定义接口实现 IProvider,需添加下面规则,保护实现 +-keep class * implements com.alibaba.android.arouter.facade.template.IProvider + # If single-type injection is used, that is, no interface is defined to implement IProvider, the following rules need to be added to protect the implementation # -keep class * implements com.alibaba.android.arouter.facade.template.IProvider diff --git a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java index cb7684922..4947310c0 100644 --- a/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java +++ b/common/src/main/java/com/yunbao/common/manager/IMLoginManager.java @@ -8,15 +8,18 @@ import android.text.TextUtils; import androidx.annotation.NonNull; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.google.gson.Gson; import com.lzf.easyfloat.EasyFloat; +import com.lzy.okgo.model.Response; import com.umeng.analytics.MobclickAgent; import com.yunbao.common.CommonAppContext; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.event.DataUserInfoEvent; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; +import com.yunbao.common.http.JsonBean; import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.manager.base.BaseCacheManager; import com.yunbao.common.manager.imrongcloud.MessageIMManager; @@ -439,6 +442,11 @@ public class IMLoginManager extends BaseCacheManager { //兼容老模块(之后要把用户维护的类更换掉) SpUtil.getInstance().setStringValue(SpUtil.USER_INFO, new Gson().toJson(userInfo)); } + + @Override + public void onError(Response response) { + super.onError(response); + } }); } From 7c669b338fcbc3277e48fbbc32d35b105f3805bb Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 26 Mar 2024 16:31:15 +0800 Subject: [PATCH 2/6] =?UTF-8?q?fix=20[=E8=8E=B7=E5=8F=96=E6=8C=87=E5=AF=BC?= =?UTF-8?q?=E5=91=98=E5=A4=87=E6=B3=A8=E4=BF=A1=E6=81=AF=20=E4=B8=BA?= =?UTF-8?q?=E7=A9=BA=E6=97=B6=E7=9A=84=E9=97=AA=E9=80=80=E9=97=AE=E9=A2=98?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../manager/InstructorRemarkManager.java | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java b/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java index 4f725edf8..2b81e5e09 100644 --- a/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java +++ b/common/src/main/java/com/yunbao/common/manager/InstructorRemarkManager.java @@ -4,12 +4,16 @@ import android.content.Context; import android.os.Handler; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.TypeReference; import com.google.gson.Gson; +import com.lzy.okgo.model.Response; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.http.HttpCallback; import com.yunbao.common.http.HttpClient; +import com.yunbao.common.http.JsonBean; import com.yunbao.common.manager.base.BaseCacheManager; +import com.yunbao.common.utils.StringUtil; import java.util.HashMap; import java.util.Map; @@ -36,8 +40,12 @@ public class InstructorRemarkManager extends BaseCacheManager { */ public Map getInstructorRemark() { if (null == instructorRemarkMap) { - instructorRemarkMap = JSON.parseObject(getString(KEY_INSTRUCTOR_REMARK), new TypeReference>() { - }); + String string = getString(KEY_INSTRUCTOR_REMARK); + if (!StringUtil.isEmpty(string)) { + instructorRemarkMap = JSON.parseObject(string, new TypeReference>() { + + }); + } } if (instructorRemarkMap == null) { instructorRemarkMap = new HashMap<>(); @@ -103,8 +111,8 @@ public class InstructorRemarkManager extends BaseCacheManager { public void run() { IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo(); HttpClient.getInstance().get("User.getInstructorRemark", "getInstructorRemark") - .params("uid", userInfo.getId(),true) - .params("token", userInfo.getToken(),true) + .params("uid", userInfo.getId(), true) + .params("token", userInfo.getToken(), true) .execute(new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -116,6 +124,11 @@ public class InstructorRemarkManager extends BaseCacheManager { } } + + @Override + public void onError(Response response) { + super.onError(response); + } }); From 99bbffed217d097af202665a7554fbc1bf539cd8 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 26 Mar 2024 16:43:34 +0800 Subject: [PATCH 3/6] =?UTF-8?q?fix=20[=E8=B7=A8=E8=AE=BE=E5=A4=87=E5=B7=B2?= =?UTF-8?q?=E8=AF=BB=E6=B6=88=E6=81=AF=E4=BE=9D=E6=97=A7=E6=8E=A8=E9=80=81?= =?UTF-8?q?=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/shayu/phonelive/AppContext.java | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/shayu/phonelive/AppContext.java b/app/src/main/java/com/shayu/phonelive/AppContext.java index 192cab24c..c1f1fe212 100644 --- a/app/src/main/java/com/shayu/phonelive/AppContext.java +++ b/app/src/main/java/com/shayu/phonelive/AppContext.java @@ -284,10 +284,25 @@ public class AppContext extends CommonAppContext { if (message.getReceivedStatus().isRead()) { return false; } - MessageChatNotifyManager.getInstance().push(AppManager.getInstance().getLastActivity() - , message.getTargetId(), - content.getContent() - ); + + RongIMClient.getInstance().getUnreadCount(Conversation.ConversationType.PRIVATE, message.getTargetId(), new RongIMClient.ResultCallback() { + @Override + public void onSuccess(Integer integer) { + if (integer > 0) { + MessageChatNotifyManager.getInstance().push(AppManager.getInstance().getLastActivity() + , message.getTargetId(), + content.getContent() + ); + } + } + + @Override + public void onError(RongIMClient.ErrorCode e) { + + } + }); + + } } } catch (Exception e) { From 1d0500128b2f8e2a1642a0245404163e9f41aa2f Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 26 Mar 2024 16:46:24 +0800 Subject: [PATCH 4/6] =?UTF-8?q?fix=20[=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E8=BA=AB=E9=AB=98=E6=A0=87=E7=AD=BE=EF=BC=8C=E8=BA=AB=E9=AB=98?= =?UTF-8?q?=E6=9C=89=E8=AF=AF]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/main/activity/PDLiveConversationActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationActivity.java b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationActivity.java index d78def165..2dab906fd 100644 --- a/main/src/main/java/com/yunbao/main/activity/PDLiveConversationActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/PDLiveConversationActivity.java @@ -332,7 +332,7 @@ public class PDLiveConversationActivity extends AbsActivity implements View.OnCl tags.add(userInfoBean.getInfo().getCareer()); } if (!StringUtil.isEmpty(userInfoBean.getInfo().getHeight()) && !userInfoBean.getInfo().getHeight().equals("0")) { - tags.add(userInfoBean.getInfo().getHeight()); + tags.add(userInfoBean.getInfo().getHeight()+"cm"); } List t; if (WordUtil.isNewZh()) { From b3fe537b2ce50b8c35afeb2744a10957bb1f84b0 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 26 Mar 2024 16:51:30 +0800 Subject: [PATCH 5/6] =?UTF-8?q?fix=20[=E8=BA=AB=E9=AB=98=E6=9C=AA=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E6=97=B6=EF=BC=8C=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E5=92=8C=E5=90=8D=E7=89=87=20=20=E6=A0=87=E7=AD=BE=E9=9C=80?= =?UTF-8?q?=E8=A6=81=E6=98=BE=E7=A4=BA=E4=B8=BA=E7=A9=BA]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yunbao/main/activity/EditProfileActivity.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java index d600937f5..9773cb423 100644 --- a/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/EditProfileActivity.java @@ -880,8 +880,9 @@ public class EditProfileActivity extends AbsActivity { userInfoBean = data; ((TextView) findViewById(R.id.occupation)).setText(data.getInfo().getCareer()); String height = data.getInfo().getHeight(); - if("0".equals(height)||StringUtil.isEmpty(height)){ - height="170"; + if ("0".equals(height) || StringUtil.isEmpty(height)) { + // height="170"; + ((TextView) findViewById(R.id.height)).setVisibility(View.GONE); } ((TextView) findViewById(R.id.height)).setText(height + "cm"); List tags = WordUtil.isNewZh() ? data.getInfo().getCn_label() : data.getInfo().getEn_label(); From 698b875a93a4c5b12ca8876a3df0bcf37731b4bc Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Tue, 26 Mar 2024 16:52:31 +0800 Subject: [PATCH 6/6] =?UTF-8?q?fix=20[=E6=89=93=E6=8B=9B=E5=91=BC=E5=BC=B9?= =?UTF-8?q?=E7=AA=97=E8=A2=AB=E9=9A=90=E8=97=8F=E9=97=AE=E9=A2=98]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yunbao/common/dialog/MessageSayHiNotifyDialog.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 e08ba1b7d..d5f8adf05 100644 --- a/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java +++ b/common/src/main/java/com/yunbao/common/dialog/MessageSayHiNotifyDialog.java @@ -77,9 +77,9 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow { @Override protected void onDismiss() { super.onDismiss(); - /*if (onDismissListener != null) { + if (onDismissListener != null) { onDismissListener.onItemClick(userInfoBean.getUser().getId() + "", isSayHi ? 2 : 1); - }*/ + } } boolean isSayHi = false; @@ -98,7 +98,7 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow { sendMsg(userInfoBean.getSayHiMsg()); dismiss(); }); - /* avatar = findViewById(R.id.avatar); + avatar = findViewById(R.id.avatar); anchorName = findViewById(R.id.anchorName); ImgLoader.display(mContext, userInfoBean.getUser().getAvatar(), avatar); anchorName.setText(userInfoBean.getUser().getUserNicename()); @@ -110,7 +110,7 @@ public class MessageSayHiNotifyDialog extends AbsDialogCenterPopupWindow { ,WordUtil.isNewZh()?"歲":"years old" ) ); - showTag();*/ + showTag(); } private void showTag() {