From f2b2c39168b562ff0fd7a35a53879af2ba624f9f Mon Sep 17 00:00:00 2001
From: hch <16607480311@163.com>
Date: Fri, 22 Mar 2024 09:28:11 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=87=E5=AD=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../com/yunbao/common/http/CommonHttpUtil.java | 2 +-
common/src/main/res/values-en-rUS/strings.xml | 2 ++
common/src/main/res/values-zh-rHK/strings.xml | 2 ++
common/src/main/res/values-zh-rTW/strings.xml | 2 ++
common/src/main/res/values-zh/strings.xml | 2 ++
common/src/main/res/values/strings.xml | 2 ++
.../yunbao/main/activity/UserHomeActivity.java | 17 +++++++++++------
7 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java
index ee0c866c9..41fd80336 100644
--- a/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java
+++ b/common/src/main/java/com/yunbao/common/http/CommonHttpUtil.java
@@ -618,7 +618,7 @@ public class CommonHttpUtil {
* 动态-不感兴趣
*/
public static void noInterest(String uid, HttpCallback callback) {
- HttpClient.getInstance().get("User.setBlack", "User.setBlack")
+ HttpClient.getInstance().get("Pdluser.setBlack", "User.setBlack")
.params("touid", uid)
.execute(callback);
}
diff --git a/common/src/main/res/values-en-rUS/strings.xml b/common/src/main/res/values-en-rUS/strings.xml
index 9dc2dcab2..7ddc3d2c2 100644
--- a/common/src/main/res/values-en-rUS/strings.xml
+++ b/common/src/main/res/values-en-rUS/strings.xml
@@ -2,4 +2,6 @@
真人认证
工会
+ 已拉黑,无法查看
+ 取消黑名单
\ No newline at end of file
diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml
index 09c3d9a13..1c5ef0b58 100644
--- a/common/src/main/res/values-zh-rHK/strings.xml
+++ b/common/src/main/res/values-zh-rHK/strings.xml
@@ -1466,4 +1466,6 @@
工会
在線
離線
+ 已拉黑,无法查看
+ 取消黑名单
diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml
index 10a2ef80f..61017c3e0 100644
--- a/common/src/main/res/values-zh-rTW/strings.xml
+++ b/common/src/main/res/values-zh-rTW/strings.xml
@@ -1466,4 +1466,6 @@
在線
離線
+ 已拉黑,无法查看
+ 取消黑名单
diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml
index 1771677a9..a6b5b2be8 100644
--- a/common/src/main/res/values-zh/strings.xml
+++ b/common/src/main/res/values-zh/strings.xml
@@ -1463,4 +1463,6 @@
在線
離線
獲讚
+ 已拉黑,无法查看
+ 取消黑名单
diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml
index e54aae184..98648964d 100644
--- a/common/src/main/res/values/strings.xml
+++ b/common/src/main/res/values/strings.xml
@@ -1485,6 +1485,8 @@ Limited ride And limited avatar frame
真人认证
工会
Like
+ 已拉黑,无法查看
+ 取消黑名单
diff --git a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java
index af4a6a0a8..de6073c90 100644
--- a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java
+++ b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java
@@ -28,6 +28,7 @@ import androidx.viewpager.widget.ViewPager;
import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
import com.google.gson.Gson;
import com.makeramen.roundedimageview.RoundedImageView;
import com.ms.banner.Banner;
@@ -198,11 +199,6 @@ public class UserHomeActivity extends AbsActivity {
@SuppressLint({"SetTextI18n", "UseCompatLoadingForDrawables"})
private void initData(HomeUserInfoBean userInfoBean) {
userInfo = userInfoBean;
- if (!userInfo.getCheckBlack().get(0).getU2t().equals("0")) {
- ToastUtil.show("已拉黑,无法查看");
- finish();
- return;
- }
if (!StringUtil.isEmpty(userInfo.getUserHomeTopInfo().getUser_president_name())) {
userPresidentLayout.setVisibility(View.VISIBLE);
userPresidentName.setText(userInfo.getUserHomeTopInfo().getUser_president_name());
@@ -551,10 +547,11 @@ public class UserHomeActivity extends AbsActivity {
findViewById(R.id.setting).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
+ String temp = userInfo.getCheckBlack().get(0).getU2t().equals("0") ? getResources().getString(R.string.black_add) : getResources().getString(com.yunbao.main.R.string.cancel_back);
SparseArray array = new SparseArray<>();
array.append(1, "不感興趣");
array.append(0, getResources().getString(R.string.report));
- array.append(2, getResources().getString(R.string.black_add));
+ array.append(2, temp);
DialogUitl.showStringArrayDialog(UserHomeActivity.this, array, new DialogUitl.StringArrayDialogCallback() {
@Override
public void onItemClick(String text, int tag) {
@@ -564,6 +561,10 @@ public class UserHomeActivity extends AbsActivity {
CommonHttpUtil.noInterest(String.valueOf(userInfo.getUserHomeTopInfo().getUser_id()), new com.yunbao.common.http.HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
+ if (code == 0 && info != null) {
+ JSONObject jsonObject = JSONObject.parseObject(info[0]);
+ userInfo.getCheckBlack().get(0).setU2t(jsonObject.getString("isblack"));
+ }
ToastUtil.show(msg);
}
});
@@ -571,6 +572,10 @@ public class UserHomeActivity extends AbsActivity {
CommonHttpUtil.noInterest(String.valueOf(userInfo.getUserHomeTopInfo().getUser_id()), new com.yunbao.common.http.HttpCallback() {
@Override
public void onSuccess(int code, String msg, String[] info) {
+ if (code == 0 && info != null) {
+ JSONObject jsonObject = JSONObject.parseObject(info[0]);
+ userInfo.getCheckBlack().get(0).setU2t(jsonObject.getString("isblack"));
+ }
ToastUtil.show(msg);
}
});