优化PK时点击礼物弹窗隐藏【开通贵族】按钮
This commit is contained in:
parent
c3ddc62b95
commit
a37a92e211
@ -150,6 +150,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
private ImageView voicePress;
|
||||
private View titleLine;
|
||||
private boolean liveIndex = true;
|
||||
private boolean isPk = false;
|
||||
|
||||
@Override
|
||||
public <T extends View> T findViewById(@IdRes int id) {
|
||||
@ -411,6 +412,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setPkStatus(isPk);
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
@ -425,6 +427,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setPkStatus(isPk);
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
@ -440,6 +443,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
}
|
||||
new Handler(Looper.getMainLooper()).post(() -> {
|
||||
LiveGiftDialogFragment fragment = new LiveGiftDialogFragment();
|
||||
fragment.setPkStatus(isPk);
|
||||
fragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
@ -673,6 +677,10 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
verticalViewPager.setEnableScroll(IMLoginManager.get(mContext).isSlide());
|
||||
}
|
||||
|
||||
public void setPkStatus(boolean isPk) {
|
||||
this.isPk = isPk;
|
||||
}
|
||||
|
||||
@Subscribe(threadMode = ThreadMode.MAIN)
|
||||
public void onLiveRoomChangeEvent(LiveRoomChangeEvent e) {
|
||||
if (verticalViewPager.ismEnableScroll()) {
|
||||
@ -945,6 +953,7 @@ public class LiveAudienceActivity extends LiveActivity {
|
||||
return;
|
||||
}
|
||||
LiveGiftDialogFragment liveGiftDialogFragment = new LiveGiftDialogFragment();
|
||||
liveGiftDialogFragment.setPkStatus(isPk);
|
||||
liveGiftDialogFragment.setLiveGuardInfo(mLiveGuardInfo);
|
||||
bundle.putString(Constants.LIVE_UID, mLiveUid);
|
||||
bundle.putString(Constants.LIVE_STREAM, mStream);
|
||||
|
@ -123,6 +123,7 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
private TextView mVipGoldTitle;
|
||||
private TextView mVipGoldDesc;
|
||||
private TextView mGiftPackage;
|
||||
private boolean isPk;
|
||||
|
||||
|
||||
@Override
|
||||
@ -154,6 +155,10 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
mLiveGuardInfo = liveGuardInfo;
|
||||
}
|
||||
|
||||
public void setPkStatus(boolean pk) {
|
||||
isPk = pk;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onActivityCreated(Bundle savedInstanceState) {
|
||||
super.onActivityCreated(savedInstanceState);
|
||||
@ -276,6 +281,9 @@ public class LiveGiftDialogFragment extends AbsDialogFragment implements View.On
|
||||
}
|
||||
loadGiftListData();
|
||||
loadUserVip();
|
||||
if (isPk) {
|
||||
mVipGold.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -387,12 +387,18 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
|
||||
mPkTimeCount--;
|
||||
if (mPkTimeCount >= 0) {//
|
||||
nextPkTimeCountDown();
|
||||
if (mContext instanceof LiveAudienceActivity) {
|
||||
((LiveAudienceActivity)mContext).setPkStatus(true);
|
||||
}
|
||||
} else {
|
||||
if (mIsPkEnd) {
|
||||
onLinkMicPkClose(0);
|
||||
if (mIsAnchor) {
|
||||
((LiveRyAnchorActivity) mContext).setPkBtnVisible(true);
|
||||
}
|
||||
if (mContext instanceof LiveAudienceActivity) {
|
||||
((LiveAudienceActivity)mContext).setPkStatus(false);
|
||||
}
|
||||
//如果PK结束Im没有发送关闭PK的消息,倒计时结束自动关闭
|
||||
// if (mLiveLinkMicPkViewHolder != null) {
|
||||
// mLiveLinkMicPkViewHolder.removeFromParent();
|
||||
|
@ -447,12 +447,18 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
String s1 = StringUtil.getDurationText(mPkTimeCount * 1000);
|
||||
time.setText("PK時間:" + s1);
|
||||
mHandler.sendEmptyMessageAtTime(WHAT_PK_TIME, getNextSecondTime());
|
||||
if (mContext instanceof LiveAudienceActivity) {
|
||||
((LiveAudienceActivity)mContext).setPkStatus(true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
time.setVisibility(View.GONE);
|
||||
if (mHandler != null) {
|
||||
mHandler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
if (mContext instanceof LiveAudienceActivity) {
|
||||
((LiveAudienceActivity)mContext).setPkStatus(false);
|
||||
}
|
||||
endDRGif();
|
||||
}
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
landscape = data.getLiveInfo().getLandscape();
|
||||
mLivePlayViewHolder.setLiveBeanLandscape(landscape);
|
||||
mLivePlayViewHolder.setLiveEnterRoomNewModel(data);
|
||||
mLivePlayViewHolder.switchStream(mLiveBean.getPull(), (data.getClarityType() - 1)==2?1:(data.getClarityType() - 1));
|
||||
mLivePlayViewHolder.switchStream(mLiveBean.getPull(), (data.getClarityType() - 1) == 2 ? 1 : (data.getClarityType() - 1));
|
||||
//是否热度卡加成
|
||||
liveHandler.postDelayed(() -> mLiveRoomViewHolder.getIsHot(data.getIsUseHotCard()), 700);
|
||||
|
||||
@ -1269,6 +1269,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
if (mLivePlayViewHolder != null) {
|
||||
mLivePlayViewHolder.setLiveBeanLandscape(1);
|
||||
}
|
||||
if (mContext instanceof LiveAudienceActivity) {
|
||||
((LiveAudienceActivity)mContext).setPkStatus(true);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -1283,6 +1286,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
||||
if (mLiveRoomViewHolder != null) {
|
||||
mLivePlayViewHolder.setLiveBeanLandscape(landscape);
|
||||
}
|
||||
if (mContext instanceof LiveAudienceActivity) {
|
||||
((LiveAudienceActivity)mContext).setPkStatus(false);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user