From e4c490577d07b77deb968061afa3bef213534ade Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Mon, 12 Dec 2022 14:11:05 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=95=B4=E8=9B=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/http/live/LiveNetManager.java | 22 +++++++++++++++++++ .../live/activity/LiveRyAnchorActivity.java | 4 +++- .../yunbao/live/views/LiveRoomViewHolder.java | 12 ++++++++++ 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index 1acdbfa92..8e879c1d7 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -635,6 +635,28 @@ public class LiveNetManager { }).isDisposed(); } + /** + * 整蛊结束 + */ + public void endPrankTurntable(String mLiveUid,HttpCallback callback){ + API.get().pdLiveApi(mContext) + .endPrankTurntable(mLiveUid) + .subscribeOn(Schedulers.io()) + .subscribe(responseModel -> { + if (callback != null) { + callback.onSuccess(null); + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + if (callback != null) { + callback.onError(throwable.getMessage()); + } + } + }).isDisposed(); + + } + /** * 直播间取消网络请求 */ diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java index 076b3f6d8..1b7503059 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -1198,7 +1198,9 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl @Override public void prankTurntable(String msgtype, int time, JSONObject jsonObject) { - + if (mLiveRoomViewHolder != null) { + mLiveRoomViewHolder.closeAndOpenTrickery(msgtype, time, jsonObject); + } } diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index d8b52023f..efbac1e3b 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -59,6 +59,7 @@ import com.yunbao.common.Constants; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.bean.AiAutomaticSpeechModel; import com.yunbao.common.bean.BannerBean; +import com.yunbao.common.bean.BaseModel; import com.yunbao.common.bean.GiftModel; import com.yunbao.common.bean.GuardUserModel; import com.yunbao.common.bean.HourRank; @@ -3430,6 +3431,17 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis countDownTimerTrickery.cancel(); countDownTimerTrickery = null; lt_trickery.setVisibility(View.GONE); + LiveNetManager.get(mContext).endPrankTurntable(mLiveUid, new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(BaseModel data) { + + } + + @Override + public void onError(String error) { + + } + }); } }