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