Merge remote-tracking branch 'origin/master'

This commit is contained in:
18401019693 2022-12-14 18:10:34 +08:00
commit 786dfb54a3
9 changed files with 36 additions and 13 deletions

View File

@ -10,7 +10,7 @@ ext {
manifestPlaceholders = [ manifestPlaceholders = [
// //
// serverHost : "https://napi.yaoulive.com", //serverHost : "https://napi.yaoulive.com",
// //
serverHost : "https://ceshi.yaoulive.com", serverHost : "https://ceshi.yaoulive.com",

View File

@ -289,7 +289,11 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
break; break;
case Constants.LIVE_FUNC_MIC://語音 case Constants.LIVE_FUNC_MIC://語音
//ToastUtil.show("開發中,敬請期待"); //ToastUtil.show("開發中,敬請期待");
openMicWindow(1); if (isDRPK != 1) {
openMicWindow(1);
} else {
ToastUtil.show("您已在PK中");
}
break; break;
case Constants.LIVE_FUNC_DR://多人PK case Constants.LIVE_FUNC_DR://多人PK
if (isDRPK != 1) { if (isDRPK != 1) {
@ -430,7 +434,11 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
} }
break; break;
case Constants.LIVE_FUNC_RANDOM_PK: case Constants.LIVE_FUNC_RANDOM_PK:
openRandomPkWindow(); if (isDRPK != 1) {
openRandomPkWindow();
} else {
ToastUtil.show("您已在PK中");
}
break; break;
default: default:
break; break;
@ -732,6 +740,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.startAnchorLiveTime(); mLiveRoomViewHolder.startAnchorLiveTime();
mLiveRoomViewHolder.startAnchorCheckLive(); mLiveRoomViewHolder.startAnchorCheckLive();
mLiveRoomViewHolder.setAnchorGoodNumber(obj.getString("goodnum"));
} }
mStartLive = true; mStartLive = true;
mLiveRoomViewHolder.startRefreshUserList(); mLiveRoomViewHolder.startRefreshUserList();

View File

@ -135,7 +135,7 @@ public class RandomPkDialogFragment extends AbsDialogFragment implements View.On
mRandomPkSwitch.setOnClickListener(this); mRandomPkSwitch.setOnClickListener(this);
mPkBtn.setOnClickListener(this); mPkBtn.setOnClickListener(this);
mPkBtn.setTag(false); mPkBtn.setTag(false);
/*mPkBtn.setOnLongClickListener(v -> { /* mPkBtn.setOnLongClickListener(v -> {
DialogUitl.showSimpleInputDialog(mContext, "输入指定UID", new DialogUitl.SimpleCallback() { DialogUitl.showSimpleInputDialog(mContext, "输入指定UID", new DialogUitl.SimpleCallback() {
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {

View File

@ -703,7 +703,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
} }
}); });
LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE); LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE);
LiveRyAnchorActivity.isDRPK=1;
ScreenDimenUtil util = ScreenDimenUtil.getInstance(); ScreenDimenUtil util = ScreenDimenUtil.getInstance();
int mScreenWdith = util.getScreenWdith(); int mScreenWdith = util.getScreenWdith();
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, mScreenWdith * 720 / 960); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, mScreenWdith * 720 / 960);
@ -757,6 +757,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
LivePushRyViewHolder.mPreView1.setLayoutParams(params); LivePushRyViewHolder.mPreView1.setLayoutParams(params);
LivePushRyViewHolder.mPreView1.setVisibility(View.VISIBLE); LivePushRyViewHolder.mPreView1.setVisibility(View.VISIBLE);
LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE); LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE);
LiveRyAnchorActivity.isDRPK=1;
JSONObject msg1 = new JSONObject(); JSONObject msg1 = new JSONObject();
msg1.put("uid", CommonAppConfig.getInstance().getUid()); msg1.put("uid", CommonAppConfig.getInstance().getUid());
@ -866,8 +867,8 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
LiveRyAnchorActivity.isDRPK = 1; LiveRyAnchorActivity.isDRPK = 1;
LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE); LivePushRyViewHolder.btn_close.setVisibility(View.VISIBLE);
SocketRyLinkMicPkUtil.linkMicPkAccept(mSocketRyClient, mApplyUid, mApplyUrl, mApplyNmae); SocketRyLinkMicPkUtil.linkMicPkAccept(mSocketRyClient, mApplyUid, mApplyUrl, mApplyNmae);
EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.UP_PK_TWO).setObject(mApplyUid));
onLinkMicPkStart(mApplyUid, 2); onLinkMicPkStart(mApplyUid, 2);
EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.UP_PK_TWO));
} }
}); });
} }
@ -1408,7 +1409,7 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
ToastUtil.show("接受失败"); ToastUtil.show("接受失败");
} }
}); });
}else { } else {
ToastUtil.show(msg); ToastUtil.show(msg);
} }
} }

View File

@ -331,7 +331,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
} }
mLiveRyLinkMicPkPresenter.onLinkMicToPk(userBean1); mLiveRyLinkMicPkPresenter.onLinkMicToPk(userBean1);
mLiveRyLinkMicPkPresenter.onLinkMicPkStart(inviteeRoomId, 3); mLiveRyLinkMicPkPresenter.onLinkMicPkStart(inviteeRoomId, 3);
EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.UP_PK_TWO)); EventBus.getDefault().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.UP_PK_TWO).setObject(userBean1.getId()));
} }
} }
}); });
@ -387,7 +387,7 @@ public class LivePushRyViewHolder extends AbsRyLivePushViewHolder implements ITX
@Override @Override
public void onConfirmClick(Dialog dialog, String content) { public void onConfirmClick(Dialog dialog, String content) {
//断开连麦 //断开连麦
LiveRyAnchorActivity.isDRPK=0;
HttpClient.getInstance().post("livepk.setliveuserout", "livepk.setliveuserout") HttpClient.getInstance().post("livepk.setliveuserout", "livepk.setliveuserout")
.execute(new HttpCallback() { .execute(new HttpCallback() {
@Override @Override

View File

@ -89,6 +89,7 @@ import com.yunbao.common.http.live.LiveNetManager;
import com.yunbao.common.interfaces.CommonCallback; import com.yunbao.common.interfaces.CommonCallback;
import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.manager.RandomPkManager;
import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.Bus;
import com.yunbao.common.utils.DeviceUtils; import com.yunbao.common.utils.DeviceUtils;
import com.yunbao.common.utils.DialogUitl; import com.yunbao.common.utils.DialogUitl;
@ -99,6 +100,7 @@ import com.yunbao.common.utils.SVGAViewUtils;
import com.yunbao.common.utils.ScreenDimenUtil; import com.yunbao.common.utils.ScreenDimenUtil;
import com.yunbao.common.utils.SpUtil; import com.yunbao.common.utils.SpUtil;
import com.yunbao.common.utils.StringUtil; import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.utils.formatBigNum; import com.yunbao.common.utils.formatBigNum;
import com.yunbao.common.views.AbsViewHolder; import com.yunbao.common.views.AbsViewHolder;
@ -1967,6 +1969,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
uidR2 = ""; uidR2 = "";
uidR1 = ""; uidR1 = "";
uidR3 = ""; uidR3 = "";
if (RandomPkManager.getInstance().isRandomModel()) {
RandomPkManager.getInstance().setPkStatus(RandomPkManager.PK_STATUS_START);
}
new Handler(Looper.getMainLooper()).postDelayed(this::initPkRank, 300);
} }
//双人pk关闭 //双人pk关闭
@ -3185,6 +3192,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public void setAnchorGoodNumber(String goodNumber) { public void setAnchorGoodNumber(String goodNumber) {
if (!StringUtil.isEmpty(goodNumber) && !goodNumber.equals("0")) { if (!StringUtil.isEmpty(goodNumber) && !goodNumber.equals("0")) {
mAnchorLayout.setBackgroundResource(R.drawable.bg_live_anchor_goodnum); mAnchorLayout.setBackgroundResource(R.drawable.bg_live_anchor_goodnum);
mID.setText(goodNumber);
mGoodNumberIcon.setVisibility(View.VISIBLE); mGoodNumberIcon.setVisibility(View.VISIBLE);
} }
} }
@ -3807,6 +3815,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
endDRGif(); endDRGif();
break; break;
case UP_PK_TWO: case UP_PK_TWO:
pkUid = (String) event.getObject();
ToastUtil.show("对方UID=" + pkUid);
UpPkTwo(); UpPkTwo();
break; break;
} }

View File

@ -366,6 +366,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.setGuardIcon(data.getGuardUserAvatar()); mLiveRoomViewHolder.setGuardIcon(data.getGuardUserAvatar());
//在线列表 //在线列表
mLiveRoomViewHolder.setUserList(data.getEnterRoomInfo().getUserlists()); mLiveRoomViewHolder.setUserList(data.getEnterRoomInfo().getUserlists());
//设置靓号
mLiveRoomViewHolder.setAnchorGoodNumber(data.getLiveInfo().getGoodnum());
List<BannerBean> bannerBeans = new ArrayList<>(); List<BannerBean> bannerBeans = new ArrayList<>();
//心愿单 //心愿单
if (data.getWishList().getWishList().size() > 0) { if (data.getWishList().getWishList().size() > 0) {
@ -506,7 +508,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.setOtherInfo(pkInfo.getString("pkuid"), pkInfo.getString("pkuimg"), pkInfo.getString("pkuname")); mLiveRoomViewHolder.setOtherInfo(pkInfo.getString("pkuid"), pkInfo.getString("pkuimg"), pkInfo.getString("pkuname"));
} }
}; };
linkMicPkStartHandler.postDelayed(linkMicPkStartRunnable,4000); linkMicPkStartHandler.postDelayed(linkMicPkStartRunnable, 4000);
} }
mLiveRyLinkMicPkPresenter.onEnterRoomPkStart(pkUid, pkInfo.getLongValue("pk_gift_liveuid"), pkInfo.getLongValue("pk_gift_pkuid"), pkInfo.getIntValue("pk_time"), livePKUserListBean); mLiveRyLinkMicPkPresenter.onEnterRoomPkStart(pkUid, pkInfo.getLongValue("pk_gift_liveuid"), pkInfo.getLongValue("pk_gift_pkuid"), pkInfo.getIntValue("pk_time"), livePKUserListBean);

View File

@ -14,7 +14,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="10dp" android:layout_marginStart="10dp"
android:layout_weight="1" android:layout_weight="0.7"
android:text="序号" android:text="序号"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="14sp" /> android:textSize="14sp" />
@ -22,7 +22,7 @@
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.4" android:layout_weight="1.5"
android:orientation="horizontal"> android:orientation="horizontal">
<com.makeramen.roundedimageview.RoundedImageView <com.makeramen.roundedimageview.RoundedImageView
@ -37,11 +37,11 @@
app:riv_oval="true" /> app:riv_oval="true" />
<TextView <TextView
android:layout_marginStart="5dp"
android:id="@+id/item_name" android:id="@+id/item_name"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginStart="5dp"
android:text="头像&amp;昵称" android:text="头像&amp;昵称"
android:textColor="#FFFFFF" android:textColor="#FFFFFF"
android:textSize="14sp" /> android:textSize="14sp" />

View File

@ -7,6 +7,7 @@
<LinearLayout <LinearLayout
android:id="@+id/turntable_layout" android:id="@+id/turntable_layout"
android:layout_marginTop="10dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:visibility="visible" android:visibility="visible"