From c92ae056067dc204a74363232c46a453183cd17e Mon Sep 17 00:00:00 2001 From: Martin <13046765170@163.com> Date: Wed, 23 Oct 2024 16:02:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=97PK=E9=82=80?= =?UTF-8?q?=E8=AF=B7=E6=97=B6=EF=BC=8C=E5=88=A4=E6=96=AD=E8=87=AA=E8=BA=AB?= =?UTF-8?q?PK=E7=8A=B6=E6=80=81=E5=92=8C=E5=AF=B9=E6=96=B9PK=E7=8A=B6?= =?UTF-8?q?=E6=80=81=20=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2=EF=BC=8CUI?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../live/presenter/AbsLinkMicPkPresenter.java | 36 +++++++++++- main/src/main/res/layout/view_new_main_me.xml | 56 +++++++++---------- 2 files changed, 61 insertions(+), 31 deletions(-) diff --git a/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java b/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java index 110acedd9..f79c24c29 100644 --- a/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java +++ b/live/src/main/java/com/yunbao/live/presenter/AbsLinkMicPkPresenter.java @@ -117,6 +117,25 @@ public abstract class AbsLinkMicPkPresenter { } protected void isPKTmp(UserBean u) { + /* if(PKing){ + ToastUtil.show(AppManager.getInstance().getMainActivity().getString(R.string.pking_over)); + }else{ + LiveHttpUtil.livePkCheckLive(u.getId()+"", "", "", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0 && info.length > 0) { + JSONObject obj = JSON.parseObject(info[0]); + if (obj != null) { + if (obj.getString("ispk").equals("0")) { + isPK(u); + } else { + ToastUtil.show(AppManager.getInstance().getMainActivity().getString(R.string.pking_over)); + } + } + } + } + }); + }*/ LiveHttpUtil.livePkCheckLive(IMLoginManager.get(AppManager.getInstance().getMainActivity()).getUserInfo().getId()+"", "", "", new HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { @@ -124,7 +143,21 @@ public abstract class AbsLinkMicPkPresenter { JSONObject obj = JSON.parseObject(info[0]); if (obj != null) { if (obj.getString("ispk").equals("0")) { - isPK(u); + LiveHttpUtil.livePkCheckLive(u.getId()+"", "", "", new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0 && info.length > 0) { + JSONObject obj = JSON.parseObject(info[0]); + if (obj != null) { + if (obj.getString("ispk").equals("0")) { + isPK(u); + } else { + ToastUtil.show(AppManager.getInstance().getMainActivity().getString(R.string.pking_over)); + } + } + } + } + }); } else { ToastUtil.show(AppManager.getInstance().getMainActivity().getString(R.string.pking_over)); } @@ -132,7 +165,6 @@ public abstract class AbsLinkMicPkPresenter { } } }); - } protected void onDRPkApplyTmp(UserBean u) { diff --git a/main/src/main/res/layout/view_new_main_me.xml b/main/src/main/res/layout/view_new_main_me.xml index 794c2743f..36a36fd6e 100644 --- a/main/src/main/res/layout/view_new_main_me.xml +++ b/main/src/main/res/layout/view_new_main_me.xml @@ -3,6 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" + android:background="#05000000" android:layout_height="match_parent"> - @@ -221,10 +221,10 @@ - - - + - @@ -374,16 +370,17 @@ android:layout_height="wrap_content" android:text="@string/open_noble_text_new" android:textColor="#777777" - android:textSize="10sp" + android:textSize="9sp" app:layout_constraintStart_toEndOf="@id/user_noble_ico" android:layout_marginStart="10dp" android:layout_marginBottom="5dp" android:maxLines="2" + android:paddingEnd="6dp" android:ellipsize="end" app:layout_constraintEnd_toEndOf="@id/guizu_center_tv" app:layout_constraintTop_toBottomOf="@id/user_noble_text" android:layout_marginEnd="5dp" - android:layout_marginTop="5dp" + android:layout_marginTop="2dp" /> @@ -432,12 +429,13 @@ - @@ -464,9 +462,9 @@