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) { + + } + }); } }