From 9711b1f8d46fff67573ca59387d37b665dd954e6 Mon Sep 17 00:00:00 2001 From: Martin <13046765170@163.com> Date: Tue, 28 May 2024 21:28:20 +0800 Subject: [PATCH] =?UTF-8?q?fix[=E5=A3=B0=E6=9C=9B=E5=8D=87=E7=BA=A7-?= =?UTF-8?q?=E4=BF=AE=E5=A4=8DBUG]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 8 ++--- .../live/activity/LiveAudienceActivity.java | 1 - .../live/views/LivePlaySwViewHolder.java | 3 +- .../live/views/LiveRyAnchorViewHolder.java | 33 ++++++++++--------- .../live/views/PortraitLiveManager.java | 3 ++ .../src/main/res/layout/view_live_play_sw.xml | 2 +- 6 files changed, 28 insertions(+), 22 deletions(-) diff --git a/gradle.properties b/gradle.properties index f8c588910..64e5acf4c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -21,10 +21,10 @@ org.gradle.configureondemand=true android.useAndroidX=true android.enableJetifier=true -systemProp.http.proxyHost=127.0.0.1 -systemProp.https.proxyHost=127.0.0.1 -systemProp.https.proxyPort=10809 -systemProp.http.proxyPort=10809 +#systemProp.http.proxyHost=127.0.0.1 +#systemProp.https.proxyHost=127.0.0.1 +#systemProp.https.proxyPort=10809 +#systemProp.http.proxyPort=10809 #android.enableR8.fullMode=true \ No newline at end of file diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index c17dc9e25..5737cd95a 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -187,7 +187,6 @@ public class LiveAudienceActivity extends LiveActivity { private boolean liveIndex = true; private boolean isPk = false; private boolean isRadPacetModle = false; - public boolean isSw; @Override public T findViewById(@IdRes int id) { diff --git a/live/src/main/java/com/yunbao/live/views/LivePlaySwViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePlaySwViewHolder.java index f57b6e365..26dac4602 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlaySwViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlaySwViewHolder.java @@ -733,12 +733,13 @@ public class LivePlaySwViewHolder extends LiveRoomPlayViewHolder { mCover.setVisibility(View.VISIBLE); } } + swAuManager.exitChannelAll(); stopPlay2(); } @Override public void stopPlay2() { - + drMicUserList = new ArrayList<>(); } @Override diff --git a/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java index f53469f4b..02e100b65 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java @@ -130,22 +130,25 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder { btn_start_dr_pk.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { - if (pk_nub <= 0) return; - //開始多人PK - HttpClient.getInstance().get("live.startDRPK", "live.startDRPK") - .params("roomid", CommonAppConfig.getInstance().getUid()) - .execute(new HttpCallback() { - @Override - public void onSuccess(int code, String msg, String[] info) { - if (code == 0) { - PKing = true; - pk_nub = pk_nub - 1; - btn_dr_pk_nub.setText("剩餘次數:" + pk_nub); - } else { - ToastUtil.show(msg); + if(pk_nub<= 0){ + ToastUtil.show("多人PK次数已用完"); + }else{ + //開始多人PK + HttpClient.getInstance().get("live.startDRPK", "live.startDRPK") + .params("roomid", CommonAppConfig.getInstance().getUid()) + .execute(new HttpCallback() { + @Override + public void onSuccess(int code, String msg, String[] info) { + if (code == 0) { + PKing = true; + pk_nub = pk_nub - 1; + btn_dr_pk_nub.setText("剩餘次數:" + pk_nub); + } else { + ToastUtil.show(msg); + } } - } - }); + }); + } } }); diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index b159a5fe5..12e1183bc 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -983,6 +983,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveRyLinkMicPkPresenter.release(); mLiveRyLinkMicPkPresenter = null; } + if(mLivePlayViewHolder!=null){ + mLivePlayViewHolder.stopPlay2(); + } if (mLiveEndViewHolder != null) { removeLiveEnd(); } diff --git a/live/src/main/res/layout/view_live_play_sw.xml b/live/src/main/res/layout/view_live_play_sw.xml index f7c596dc0..cdcd20495 100644 --- a/live/src/main/res/layout/view_live_play_sw.xml +++ b/live/src/main/res/layout/view_live_play_sw.xml @@ -69,7 +69,7 @@