diff --git a/common/src/main/java/com/yunbao/common/views/CustomDrawerPopupView.java b/common/src/main/java/com/yunbao/common/views/CustomDrawerPopupView.java index 7705efb0b..232ea3a6c 100644 --- a/common/src/main/java/com/yunbao/common/views/CustomDrawerPopupView.java +++ b/common/src/main/java/com/yunbao/common/views/CustomDrawerPopupView.java @@ -139,7 +139,7 @@ public class CustomDrawerPopupView extends DrawerPopupView { ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.online), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { - XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.diamond_linear)); + XPopup.Builder builder = new XPopup.Builder(getContext()).atView(findViewById(R.id.more_menu)); builder.hasShadowBg(false) .isDestroyOnDismiss(true) .isLightStatusBar(false) diff --git a/common/src/main/res/layout/fragment_gift_already_wall.xml b/common/src/main/res/layout/fragment_gift_already_wall.xml index 40823ee2c..9721fe0bc 100644 --- a/common/src/main/res/layout/fragment_gift_already_wall.xml +++ b/common/src/main/res/layout/fragment_gift_already_wall.xml @@ -65,6 +65,7 @@ android:background="@drawable/icon_gift_wall_no_data" /> diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml index 779e9508f..7aff8dfc1 100644 --- a/common/src/main/res/values-zh-rHK/strings.xml +++ b/common/src/main/res/values-zh-rHK/strings.xml @@ -1260,7 +1260,7 @@ 榮譽成就 已點亮 未點亮 - 全服冠軍 + 全服冠名 愛\“禮\”伊始,\“墻\”勢點亮 暫無點亮 暂无未点亮礼物哦 立即點亮 diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml index d8411b0e9..fb0b03c95 100644 --- a/common/src/main/res/values-zh-rTW/strings.xml +++ b/common/src/main/res/values-zh-rTW/strings.xml @@ -1259,7 +1259,7 @@ 榮譽成就 已點亮 未點亮 - 全服冠軍 + 全服冠名 愛\“禮\”伊始,\“墻\”勢點亮 暫無點亮 暂无未点亮礼物哦 立即點亮 diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index 76445da00..ea5c28b85 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1257,7 +1257,7 @@ 已點亮%s個 圖鑒 未點亮 - 全服冠軍 + 全服冠名 愛\“禮\”伊始,\“墻\”勢點亮 暫無點亮 暂无未点亮礼物哦 立即點亮 diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 44867ace4..6977273ea 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1264,6 +1264,7 @@ Limited ride And limited avatar frame unlit All service Love \"ceremony \" at the beginning, \"wall \" potential light temporarily no light + 当前活动暂未送出任何礼物哦 No unlit gifts yet Instant light Gift Wall Entrance @@ -1307,5 +1308,6 @@ Limited ride And limited avatar frame 请输入自定义数量 请在直播间内进行送礼 已送出 + 立即送出 diff --git a/live/src/main/java/com/yunbao/live/activity/GiftWallActivity.java b/live/src/main/java/com/yunbao/live/activity/GiftWallActivity.java index d078f3b50..0e3d931aa 100644 --- a/live/src/main/java/com/yunbao/live/activity/GiftWallActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/GiftWallActivity.java @@ -46,6 +46,7 @@ public class GiftWallActivity extends AbsActivity { private List tabView = new ArrayList<>(); private String mStream, mAnchorName, mLiveUid, mAvatarUrl; private int isAttention = 0;//是否关注 0=没关注, + private boolean isLive; @Override protected int getLayoutId() { @@ -88,7 +89,7 @@ public class GiftWallActivity extends AbsActivity { ViewClicksAntiShake.clicksAntiShake(layoutLitIcon, () -> { selectTab(textLitIcon, viewLitIcon); FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); - transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid)); + transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive)); transaction.commit(); }); ViewClicksAntiShake.clicksAntiShake(layoutUnlitIcon, new ViewClicksAntiShake.ViewClicksCallBack() { @@ -117,7 +118,7 @@ public class GiftWallActivity extends AbsActivity { public void onViewClicks() { new XPopup.Builder(GiftWallActivity.this) .enableDrag(false) - .asCustom(new CodexDialog(GiftWallActivity.this, mStream, mLiveUid, false)) + .asCustom(new CodexDialog(GiftWallActivity.this, mStream, mLiveUid, isLive)) .show(); } }); @@ -126,7 +127,7 @@ public class GiftWallActivity extends AbsActivity { public void onViewClicks() { new XPopup.Builder(GiftWallActivity.this) .enableDrag(false) - .asCustom(new MedalAchievementPopup(GiftWallActivity.this, false, mLiveUid, mLiveUid)) + .asCustom(new MedalAchievementPopup(GiftWallActivity.this, isLive, mLiveUid, mLiveUid)) .show(); } }); @@ -154,12 +155,17 @@ public class GiftWallActivity extends AbsActivity { mAnchorName = intent.getStringExtra("mAnchorName"); mAvatarUrl = intent.getStringExtra("mAvatarUrl"); isAttention = intent.getIntExtra("isAttention", 0); - + isLive = intent.getBooleanExtra("isLive", false); FragmentTransaction transaction = getSupportFragmentManager().beginTransaction(); - transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid)); + transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, mLiveUid, isLive)); transaction.commit(); ImgLoader.display(GiftWallActivity.this, mAvatarUrl, avatar); anchorName.setText(mAnchorName); + if (isLive) { + textLitIcon.setText(getString(R.string.lit_icon)); + } else { + textLitIcon.setText(getString(R.string.been_sent)); + } } private void selectTab(TextView textView, View tab) { diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java b/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java index 474797962..e1a6fe9e4 100644 --- a/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java @@ -83,7 +83,7 @@ public class GiftWallDialog extends AbsDialogFragment { ViewClicksAntiShake.clicksAntiShake(layoutLitIcon, () -> { selectTab(textLitIcon, viewLitIcon); FragmentTransaction transaction = getChildFragmentManager().beginTransaction(); - transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid)); + transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid,isLive)); transaction.commit(); }); ViewClicksAntiShake.clicksAntiShake(layoutUnlitIcon, new ViewClicksAntiShake.ViewClicksCallBack() { @@ -163,7 +163,7 @@ public class GiftWallDialog extends AbsDialogFragment { isAttention = bundle.getInt("isAttention"); isLive = bundle.getBoolean("isLive"); FragmentTransaction transaction = getChildFragmentManager().beginTransaction(); - transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid)); + transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid, toUid,isLive)); transaction.commit(); ImgLoader.display(getContext(), mAvatarUrl, avatar); anchorName.setText(mAnchorName); diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftWallItemPopup.java b/live/src/main/java/com/yunbao/live/dialog/GiftWallItemPopup.java index 2f2a138e2..e0c8e79dd 100644 --- a/live/src/main/java/com/yunbao/live/dialog/GiftWallItemPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/GiftWallItemPopup.java @@ -81,7 +81,7 @@ public class GiftWallItemPopup extends CenterPopupView { public void loadData() { LiveNetManager.get(getContext()). - giftDetail(mLiveUid, String.valueOf(giftDetails.getId()), new HttpCallback() { + giftDetail(mLiveUid, String.valueOf(giftWallModel.getId()), new HttpCallback() { @Override public void onSuccess(GiftWallGiftDetail data) { if (data.getUid() == 0) { diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java index cfb401209..d3c6bcdf3 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveGiftPopup.java @@ -664,7 +664,10 @@ public class LiveGiftPopup extends AbsDialogFragment { public void onLiveGiftItemEvent(LiveGiftItemEvent event) { liveGiftModel = event.getLiveGiftModel(); - if (!TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") && !TextUtils.equals(liveGiftModel.getNamingUid(), "0")) { + if (!TextUtils.isEmpty(liveGiftModel.getNamingLiveuid()) && + !TextUtils.isEmpty(liveGiftModel.getNamingUid()) && + !TextUtils.equals(liveGiftModel.getNamingLiveuid(), "0") && + !TextUtils.equals(liveGiftModel.getNamingUid(), "0")) { namingLayout.setVisibility(View.VISIBLE); ImgLoader.display(mContext, liveGiftModel.getNamingLiveAvatar(), namingAvatar); StringBuffer namingNameText = new StringBuffer(); diff --git a/live/src/main/java/com/yunbao/live/views/GiftAlreadyWallFragment.java b/live/src/main/java/com/yunbao/live/views/GiftAlreadyWallFragment.java index ed577b967..542558451 100644 --- a/live/src/main/java/com/yunbao/live/views/GiftAlreadyWallFragment.java +++ b/live/src/main/java/com/yunbao/live/views/GiftAlreadyWallFragment.java @@ -1,6 +1,7 @@ package com.yunbao.live.views; import android.os.Bundle; +import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -13,23 +14,25 @@ import androidx.recyclerview.widget.RecyclerView; import com.yunbao.common.R; import com.yunbao.common.adapter.GiftAlreadyWallAdapter; import com.yunbao.common.bean.GiftAlreadyWallModel; +import com.yunbao.common.event.LiveGiftDialogEvent; import com.yunbao.common.fragment.BaseFragment; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; +import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.event.LiveAudienceEvent; -import com.yunbao.common.event.LiveGiftDialogEvent; /** * 已点亮礼物墙 */ public class GiftAlreadyWallFragment extends BaseFragment { - private String mStream, mLiveUid,toUid; + private String mStream, mLiveUid, toUid; private LinearLayout giftWallNoData, giftWallData; private RecyclerView alreadyList; private GiftAlreadyWallAdapter alreadyWallAdapter; - private TextView litIcon, giftAll; + private TextView litIcon, giftAll, unlitIconHint, instantLight; + private boolean isAnchor; @Override public View createView(LayoutInflater layoutInflater, ViewGroup viewGroup) { @@ -42,6 +45,7 @@ public class GiftAlreadyWallFragment extends BaseFragment { mStream = bundle.getString("mStream"); mLiveUid = bundle.getString("mLiveUid"); toUid = bundle.getString("toUid"); + isAnchor = bundle.getBoolean("isAnchor"); } @Override @@ -51,9 +55,19 @@ public class GiftAlreadyWallFragment extends BaseFragment { alreadyList = contentView.findViewById(R.id.already_list); litIcon = contentView.findViewById(R.id.lit_icon); giftAll = contentView.findViewById(R.id.gift_all); + instantLight = contentView.findViewById(R.id.instant_light); + unlitIconHint = contentView.findViewById(R.id.unlit_icon_hint); alreadyWallAdapter = new GiftAlreadyWallAdapter(); alreadyList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false)); alreadyList.setAdapter(alreadyWallAdapter); + if (isAnchor) { + unlitIconHint.setText(getContext().getString(R.string.unlit_icon_hint)); + } else { + unlitIconHint.setText(getContext().getString(R.string.unlit_icon_hint2)); + } + if (TextUtils.equals(IMLoginManager.get(getContext()).getUserInfo().getId() + "", toUid)) { + instantLight.setVisibility(View.VISIBLE); + } ViewClicksAntiShake.clicksAntiShake(contentView.findViewById(R.id.instant_light), new ViewClicksAntiShake.ViewClicksCallBack() { @Override public void onViewClicks() { @@ -69,7 +83,7 @@ public class GiftAlreadyWallFragment extends BaseFragment { @Override protected void loadData() { LiveNetManager.get(getActivity()). - giftAlreadyWall(mLiveUid,toUid, new HttpCallback() { + giftAlreadyWall(mLiveUid, toUid, new HttpCallback() { @Override public void onSuccess(GiftAlreadyWallModel data) { if (data.getGiftWall().size() > 0) { @@ -91,13 +105,14 @@ public class GiftAlreadyWallFragment extends BaseFragment { }); } - public static GiftAlreadyWallFragment newInstance(String mStream, String mLiveUid,String toUid) { + public static GiftAlreadyWallFragment newInstance(String mStream, String mLiveUid, String toUid, boolean isAnchor) { GiftAlreadyWallFragment liveGiftFragment = new GiftAlreadyWallFragment(); Bundle bundle = new Bundle(); bundle.putString("mStream", mStream); bundle.putString("mLiveUid", mLiveUid); bundle.putString("mLiveUid", mLiveUid); bundle.putString("toUid", toUid); + bundle.putBoolean("isAnchor", isAnchor); liveGiftFragment.setArguments(bundle); return liveGiftFragment; }