Merge branch 'master' into dev_6.6.8
This commit is contained in:
commit
8e2acc3417
@ -383,7 +383,12 @@ public class LiveGiftAnimPresenter {
|
|||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
changeLiveRoom();
|
if (mIvLook.getTag()!=null&&mIvLook.getTag()instanceof LiveReceiveGiftBean){
|
||||||
|
changeLiveRoom((LiveReceiveGiftBean) mIvLook.getTag());
|
||||||
|
}else {
|
||||||
|
changeLiveRoom();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -431,12 +436,57 @@ public class LiveGiftAnimPresenter {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
private void changeLiveRoom(LiveReceiveGiftBean mTempGifGiftBean) {
|
||||||
|
if (mTempGifGiftBean != null) {
|
||||||
|
String uid = mTempGifGiftBean.getUid();
|
||||||
|
String userId = CommonAppConfig.getInstance().getUid();
|
||||||
|
if (!TextUtils.isEmpty(mLiveUid)) {
|
||||||
|
userId = mLiveUid;
|
||||||
|
}
|
||||||
|
if (userId.equals(uid)) {
|
||||||
|
ToastUtil.show(WordUtil.isNewZh() ? "已在当前直播间" : "Already in the current studio");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mTempGifGiftBean.getRoomnum() == null || mTempGifGiftBean.getRoomnum().isEmpty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
LiveHttpUtil.getLiveInfo(mTempGifGiftBean.getRoomnum(), new HttpCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
if (code == 0 && info.length > 0) {
|
||||||
|
LiveBean liveBean = JSON.parseObject(info[0], LiveBean.class);
|
||||||
|
new LiveRoomCheckLivePresenter(mContext, liveBean.getUid(), liveBean.getStream(), new LiveRoomCheckLivePresenter.NewActionListener() {
|
||||||
|
@Override
|
||||||
|
public void onLiveRoomChanged(String liveUid, String stream, int liveType, String liveTypeVal, String liveSdk) {
|
||||||
|
if (liveBean == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (MicStatusManager.getInstance().isMic(liveUid)) {
|
||||||
|
MicStatusManager.getInstance().showDownMicDialog(mContext);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, Integer.parseInt(liveTypeVal)).setLiveEnd(true));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCheckError(String contextError) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void changeLiveRoom() {
|
private void changeLiveRoom() {
|
||||||
if (mTempGifGiftBean != null) {
|
if (mTempGifGiftBean != null) {
|
||||||
String uid = mTempGifGiftBean.getUid();
|
String uid = mTempGifGiftBean.getUid();
|
||||||
String userId = CommonAppConfig.getInstance().getUid();
|
String userId = CommonAppConfig.getInstance().getUid();
|
||||||
|
if (!TextUtils.isEmpty(mLiveUid)) {
|
||||||
|
userId = mLiveUid;
|
||||||
|
}
|
||||||
if (userId.equals(uid)) {
|
if (userId.equals(uid)) {
|
||||||
ToastUtil.show(WordUtil.isNewZh() ? "已在当前直播间" : "Already in the current studio");
|
ToastUtil.show(WordUtil.isNewZh() ? "已在当前直播间" : "Already in the current studio");
|
||||||
return;
|
return;
|
||||||
@ -1009,11 +1059,13 @@ public class LiveGiftAnimPresenter {
|
|||||||
superNotice.setBackgroundResource(R.mipmap.super_notice);
|
superNotice.setBackgroundResource(R.mipmap.super_notice);
|
||||||
mIvLook.setText(R.string.live_onlookers);
|
mIvLook.setText(R.string.live_onlookers);
|
||||||
mAncherName = mTempGifGiftBean.getAncherName();
|
mAncherName = mTempGifGiftBean.getAncherName();
|
||||||
|
mRoomNum = bean.getRoomnum();
|
||||||
mGifGiftTipAllServer.setSelected(false);
|
mGifGiftTipAllServer.setSelected(false);
|
||||||
mGifGiftTipGroupAllServer.setAlpha(1f);
|
mGifGiftTipGroupAllServer.setAlpha(1f);
|
||||||
mGifGiftTipGroupAllServer.setVisibility(View.VISIBLE);
|
mGifGiftTipGroupAllServer.setVisibility(View.VISIBLE);
|
||||||
textRender.render(mContext, mGifGiftTipAllServer, mTempGifGiftBean.getGiftIcon(), mTempGifGiftBean.getUserNiceName(), mAncherName, mTempGifGiftBean.getGiftName(), 1, mWindowManager, "");
|
textRender.render(mContext, mGifGiftTipAllServer, mTempGifGiftBean.getGiftIcon(), mTempGifGiftBean.getUserNiceName(), mAncherName, mTempGifGiftBean.getGiftName(), 1, mWindowManager, "");
|
||||||
mIvLook.setVisibility(View.VISIBLE);
|
mIvLook.setVisibility(View.VISIBLE);
|
||||||
|
mIvLook.setTag(bean);
|
||||||
mGifGiftTipShowAnimatorAllServer.start();
|
mGifGiftTipShowAnimatorAllServer.start();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1138,12 +1190,12 @@ public class LiveGiftAnimPresenter {
|
|||||||
int unameSize = textMsg.length();
|
int unameSize = textMsg.length();
|
||||||
builder.setSpan(new ForegroundColorSpan(Color.parseColor(dto.getColour())), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
builder.setSpan(new ForegroundColorSpan(Color.parseColor(dto.getColour())), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||||
}
|
}
|
||||||
if (!showB){
|
if (!showB) {
|
||||||
iv_look_full_service_notice_new3.setVisibility(View.GONE);
|
iv_look_full_service_notice_new3.setVisibility(View.GONE);
|
||||||
}else {
|
} else {
|
||||||
if (TextUtils.equals(event.getJumpType(),"0")){
|
if (TextUtils.equals(event.getJumpType(), "0")) {
|
||||||
iv_look_full_service_notice_new3.setVisibility(View.GONE);
|
iv_look_full_service_notice_new3.setVisibility(View.GONE);
|
||||||
}else {
|
} else {
|
||||||
iv_look_full_service_notice_new3.setVisibility(View.VISIBLE);
|
iv_look_full_service_notice_new3.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3990,6 +3990,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
|||||||
if (mLiveGiftAnimPresenter == null) {
|
if (mLiveGiftAnimPresenter == null) {
|
||||||
mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
|
mLiveGiftAnimPresenter = new LiveGiftAnimPresenter(mContext, mContentView, mGifImageView, mSVGAImageView, mLiveGiftPrizePoolContainer, windowManager);
|
||||||
}
|
}
|
||||||
|
mLiveGiftAnimPresenter.setLiveUidStream(mLiveUid,mStream);
|
||||||
mLiveGiftAnimPresenter.showGiftAnim(bean, isAncher);
|
mLiveGiftAnimPresenter.showGiftAnim(bean, isAncher);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user