add[修復BUG]

This commit is contained in:
Martin 2024-06-16 16:26:01 +08:00
parent 3318fa761c
commit 9fa4924278
5 changed files with 22 additions and 12 deletions

View File

@ -230,7 +230,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
@Override @Override
public void onViewClicks() { public void onViewClicks() {
if ((int) mPrankBtn.getTag() == 0) { if ((int) mPrankBtn.getTag() == 0) {
setPrankConfig(); setPrankConfig(false);
} else { } else {
setGiftBean(recyclerAdapter.getList(),"0"); setGiftBean(recyclerAdapter.getList(),"0");
} }
@ -241,7 +241,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
public void onViewClicks() { public void onViewClicks() {
if ((int) mPrankBtn.getTag() == 0) { if ((int) mPrankBtn.getTag() == 0) {
clearPrankConfig(); clearPrankConfig();
setPrankConfig(); setPrankConfig(true);
} else { } else {
giftSwitch1Btn.setTag("false"); giftSwitch1Btn.setTag("false");
giftSwitch1Btn.setImageResource(R.mipmap.special_icon_off); giftSwitch1Btn.setImageResource(R.mipmap.special_icon_off);
@ -304,7 +304,7 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
mBtnAddGift.setVisibility(View.VISIBLE); mBtnAddGift.setVisibility(View.VISIBLE);
mGiftNotDate.setVisibility(View.VISIBLE); mGiftNotDate.setVisibility(View.VISIBLE);
recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_GIFT); recyclerAdapter.setViewType(LivePrankRecyclerAdapter.TYPE_GIFT);
mPrankBtn.setBackgroundResource(R.drawable.bg_live_prank_gift_set); mPrankBtn.setBackgroundResource(R.drawable.bg_live_prank_turntable_save);
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
mPrankBtn.setText("添加禮物"); mPrankBtn.setText("添加禮物");
@ -531,15 +531,17 @@ public class LivePrankDialogFragment extends AbsDialogFragment implements View.O
setDate(bean); setDate(bean);
} }
private void setPrankConfig() { private void setPrankConfig(boolean isClear) {
if (StringUtil.isEmpty(bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6())) { if(!isClear){
if (StringUtil.isEmpty(bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6())) {
if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { if (IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) {
ToastUtil.show("保存失败:所有转盘位置必填"); ToastUtil.show("保存失败:所有转盘位置必填");
} else { } else {
ToastUtil.show("Save failed: all turntable positions must be filled in"); ToastUtil.show("Save failed: all turntable positions must be filled in");
}
return;
} }
return;
} }
LiveNetManager.get(mContext).setAnchorPrankTurntable(mLiveUid, bean.getCoin() + "", bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6(), bean.getStatus() + "", new HttpCallback<Object>() { LiveNetManager.get(mContext).setAnchorPrankTurntable(mLiveUid, bean.getCoin() + "", bean.getTurntable1(), bean.getTurntable2(), bean.getTurntable3(), bean.getTurntable4(), bean.getTurntable5(), bean.getTurntable6(), bean.getStatus() + "", new HttpCallback<Object>() {
@Override @Override

View File

@ -430,6 +430,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
private LinearLayout prank_top_layout; private LinearLayout prank_top_layout;
private ImageView prank_group_top_icon; private ImageView prank_group_top_icon;
private int mPrankType;
private pl.droidsonroids.gif.GifDrawable mGifDrawable; private pl.droidsonroids.gif.GifDrawable mGifDrawable;
private static boolean isSw; private static boolean isSw;
@ -1721,7 +1723,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
}else{ }else{
prankAdapter.showAnView(prankAndComboList,prankAnisShow); prankAdapter.showAnView(prankAndComboList,prankAnisShow);
prank_group_turntable.setText(WordUtil.isNewZh()?"待完成整蠱":"To do"); prank_group_turntable.setText(WordUtil.isNewZh()?"待完成整蠱":"To do");
prank_group_title.setText(WordUtil.isNewZh()?"待完成整蠱":"To do"); prank_group_title.setText(WordUtil.isNewZh()?"整蠱進度":"To do");
} }
}); });
@ -1871,6 +1873,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} }
//设置整蛊礼物数据 //设置整蛊礼物数据
private void setPrankList(int status,int mPrankType,int prankTurntableStatus){ private void setPrankList(int status,int mPrankType,int prankTurntableStatus){
this.mPrankType =mPrankType;
// LogUtils.e("yqw=====>显示转盘icon:是否显示:"+(prankTurntableStatus == 1)+",是否在倒计时"+(lt_trickery.getVisibility() == View.VISIBLE)); // LogUtils.e("yqw=====>显示转盘icon:是否显示:"+(prankTurntableStatus == 1)+",是否在倒计时"+(lt_trickery.getVisibility() == View.VISIBLE));
if (prankTurntableStatus == 1 && lt_trickery.getVisibility() == View.GONE){ if (prankTurntableStatus == 1 && lt_trickery.getVisibility() == View.GONE){
if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){ if(CommonAppConfig.getInstance().getUid().equals(mLiveUid)){
@ -1898,6 +1901,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
prank_top_layout.setOnClickListener(new View.OnClickListener() { prank_top_layout.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View view) { public void onClick(View view) {
if(mPrankType!=1){
return;
}
prank_group.setVisibility(View.GONE); prank_group.setVisibility(View.GONE);
prank_small_icon.setVisibility(View.VISIBLE); prank_small_icon.setVisibility(View.VISIBLE);
switchGifDrawable(!completedList.isEmpty()); switchGifDrawable(!completedList.isEmpty());

View File

@ -269,7 +269,7 @@
android:layout_height="26dp" android:layout_height="26dp"
android:layout_gravity="end|center_vertical" android:layout_gravity="end|center_vertical"
android:layout_marginEnd="11dp" android:layout_marginEnd="11dp"
android:text="立即前往" android:text="@string/prank_im_immediately_go"
android:gravity="center" android:gravity="center"
android:textColor="@color/white" android:textColor="@color/white"
android:background="@drawable/prank_msg_goto" android:background="@drawable/prank_msg_goto"

View File

@ -145,4 +145,5 @@
<string name="live_prank_gift_dialog_number_btn">+ Set other quantity (up to 9999)</string> <string name="live_prank_gift_dialog_number_btn">+ Set other quantity (up to 9999)</string>
<string name="alive_prank_gift_dialog_explain">Trick instructions</string> <string name="alive_prank_gift_dialog_explain">Trick instructions</string>
<string name="prank_open_live_msg">Entertainment Tricky has been newly upgraded. Go and set up Tricky content to add more fun to the live broadcast room!</string> <string name="prank_open_live_msg">Entertainment Tricky has been newly upgraded. Go and set up Tricky content to add more fun to the live broadcast room!</string>
<string name="prank_im_immediately_go">Go now</string>
</resources> </resources>

View File

@ -142,4 +142,5 @@
<string name="combo_vote_more">連擊最多優先</string> <string name="combo_vote_more">連擊最多優先</string>
<string name="alive_prank_gift_dialog_explain">整蠱說明</string> <string name="alive_prank_gift_dialog_explain">整蠱說明</string>
<string name="prank_open_live_msg">娛樂整蠱全新升級,快去設置整蠱内容,給直播間增加更多趣味吧!</string> <string name="prank_open_live_msg">娛樂整蠱全新升級,快去設置整蠱内容,給直播間增加更多趣味吧!</string>
<string name="prank_im_immediately_go">立即前往</string>
</resources> </resources>