1、全服通知,新增【围观】按钮显示判断逻辑

This commit is contained in:
Martin 2024-07-04 13:16:48 +08:00
parent 96b80a460b
commit 9dd3619049
2 changed files with 19 additions and 6 deletions

View File

@ -1086,7 +1086,11 @@ public class LiveGiftAnimPresenter {
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); if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
mIvLook.setVisibility(View.GONE);
}else{
mIvLook.setVisibility(View.VISIBLE);
}
mIvLook.setTag(bean); mIvLook.setTag(bean);
mIvLook.setVisibility(mLiveUid.equals(bean.getUid())?View.GONE:View.VISIBLE); mIvLook.setVisibility(mLiveUid.equals(bean.getUid())?View.GONE:View.VISIBLE);
mGifGiftTipShowAnimatorAllServer.start(); mGifGiftTipShowAnimatorAllServer.start();
@ -1132,7 +1136,11 @@ public class LiveGiftAnimPresenter {
break; break;
} }
mIvLook.setText(R.string.participate_in); mIvLook.setText(R.string.participate_in);
mIvLook.setVisibility(View.VISIBLE); if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
mIvLook.setVisibility(View.GONE);
}else{
mIvLook.setVisibility(View.VISIBLE);
}
superNotice.setBackgroundResource(R.mipmap.icon_blind_box_headlines); superNotice.setBackgroundResource(R.mipmap.icon_blind_box_headlines);
textRender.blindBoxText(mContext, mGifGiftTipAllServer, serverNotifyEvent); textRender.blindBoxText(mContext, mGifGiftTipAllServer, serverNotifyEvent);
} }
@ -1223,10 +1231,10 @@ 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 ||CommonAppConfig.getInstance().getUid().equals(mLiveUid)) {
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")||CommonAppConfig.getInstance().getUid().equals(mLiveUid)) {
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);
@ -1316,8 +1324,12 @@ public class LiveGiftAnimPresenter {
if (!TextUtils.isEmpty(event.getIsOnlookers()) && TextUtils.equals("0", event.getIsOnlookers())) { if (!TextUtils.isEmpty(event.getIsOnlookers()) && TextUtils.equals("0", event.getIsOnlookers())) {
mIvLookBuyGuardNew.setVisibility(View.GONE); mIvLookBuyGuardNew.setVisibility(View.GONE);
} else { } else {
mIvLookBuyGuardNew.setVisibility(View.VISIBLE); if(event.getLiveuid().equals(mLiveUid)||CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
mIvLookBuyGuardNew.setText(WordUtil.isNewZh() ? "圍觀" : "Views"); mIvLookBuyGuardNew.setVisibility(View.GONE);
}else{
mIvLookBuyGuardNew.setVisibility(View.VISIBLE);
mIvLookBuyGuardNew.setText(WordUtil.isNewZh() ? "圍觀" : "Views");
}
} }
mGifGiftTipShowAnimatorBuyGuardNew.start(); mGifGiftTipShowAnimatorBuyGuardNew.start();

View File

@ -1159,6 +1159,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="51dp" android:layout_height="51dp"
android:translationX="500dp" android:translationX="500dp"
tools:visibility="visible"
android:visibility="invisible"> android:visibility="invisible">
<LinearLayout <LinearLayout