删除礼物面板周星礼物提示

This commit is contained in:
Max
2024-02-27 20:19:41 +08:00
parent 44c76eb00d
commit c264a25d66
2 changed files with 0 additions and 90 deletions

View File

@@ -197,12 +197,6 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
@Nullable
private DrawGiftHelper drawGiftHelper;
@Nullable
private Disposable luckyMsgDisposable;
private BaseQuickAdapter<LuckyBagNoticeInfo, BaseViewHolder> luckyMsgAdapter;
private BannerViewPager<SimpleUserInfo> mStarWeekBanner;
public GiftDialog(Context context, int giftId) {
this(context, 0, true, false, true, giftId);
}
@@ -454,7 +448,6 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
sendContainer = root.findViewById(R.id.send_container);
layoutEmpty.setVisibility(View.GONE);
tvGiftValue = root.findViewById(R.id.tv_gift_value);
mStarWeekBanner = findViewById(R.id.star_week_list);
if (giftId == 0) {
// 更新所有礼物
@@ -633,7 +626,6 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
position == GiftIndicator.TYPE_SING_ROOM ||
position == GiftIndicator.TYPE_DRAW_GIFT) {
showEmptyView();
updateWeekStarDesc();
isShowDrawGiftModel = false;
updateDrawGift();
} else {
@@ -655,7 +647,6 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
updateNumber(1);
}
}
updateWeekStarDesc();
isShowDrawGiftModel = false;
updateDrawGift();
giftIndicator.post(() -> {
@@ -667,75 +658,6 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
});
}
private void updateWeekStarDesc() {
if (giftIndicator.getCurrrentType() == GiftIndicator.TYPE_WEEK) {
llStarWeek.setVisibility(View.GONE);
mStarWeekBanner.setVisibility(View.VISIBLE);
} else {
llStarWeek.setVisibility(View.GONE);
mStarWeekBanner.setVisibility(View.GONE);
return;
}
if (currentGiftInfo == null) {
llStarWeek.setVisibility(View.INVISIBLE);
mStarWeekBanner.setVisibility(View.GONE);
return;
}
SimpleUserInfo firstCharmRankUser = currentGiftInfo.getFirstCharmRankUser();
if (firstCharmRankUser != null) {
ImageLoadUtils.loadImage(getContext(), firstCharmRankUser.getAvatar(), ivAvatarCharm);
ivAvatarCharm.setOnClickListener(v -> {
if (firstCharmRankUser.getUid() == 0) return;
EventBus.getDefault().post(new ShowUserInfoDialogEvent(String.valueOf(firstCharmRankUser.getUid())));
});
tvNickCharm.setText(StringExtensionKt.subAndReplaceDot(firstCharmRankUser.getNick(), 10));
} else {
ivAvatarCharm.setOnClickListener(null);
ivAvatarCharm.setImageResource(R.drawable.default_avatar);
tvNickCharm.setText(ResUtil.getString(R.string.ui_widget_giftdialog_013));
}
SimpleUserInfo firstLevelRankUser = currentGiftInfo.getFirstLevelRankUser();
if (firstLevelRankUser != null) {
ImageLoadUtils.loadImage(getContext(), firstLevelRankUser.getAvatar(), ivAvatarLevel);
ivAvatarLevel.setOnClickListener(v -> {
if (firstLevelRankUser.getUid() == 0) return;
EventBus.getDefault().post(new ShowUserInfoDialogEvent(String.valueOf(firstLevelRankUser.getUid())));
});
tvNickLevel.setText(StringExtensionKt.subAndReplaceDot(firstLevelRankUser.getNick(), 10));
} else {
ivAvatarLevel.setOnClickListener(null);
ivAvatarLevel.setImageResource(R.drawable.default_avatar);
tvNickLevel.setText(ResUtil.getString(R.string.ui_widget_giftdialog_014));
}
List<SimpleUserInfo> list = new ArrayList<>();
if (firstCharmRankUser != null) {
list.add(firstCharmRankUser);
} else {
list.add(new SimpleUserInfo());
}
if (firstLevelRankUser != null) {
list.add(firstLevelRankUser);
} else {
list.add(new SimpleUserInfo());
}
mStarWeekBanner.setAdapter(new StarWeekAdapter());
mStarWeekBanner.setPageMargin(UIUtil.dip2px(context, 10))
.setScrollDuration(1200)
.setInterval(4500)
.setRevealWidth(BannerUtils.dp2px(0f))
.setOnPageClickListener((clickedView, position) -> {
DialogWebViewActivity.start(context, UriProvider.getWeekStarUrl(), true);
})
.create(list);
}
private void updateDrawGift() {
if (drawGiftHelper == null) {
drawGiftHelper = new DrawGiftHelper((Activity) context);
@@ -950,7 +872,6 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
lastSelectedItem = item;
currentGiftInfo = item.data;
setGoldOrRadishText(lastSelectedItem);
updateWeekStarDesc();
isShowDrawGiftModel = true;
updateDrawGift();
});

View File

@@ -6,17 +6,6 @@
android:layout_height="wrap_content"
android:layout_gravity="bottom">
<com.zhpan.bannerview.BannerViewPager
android:id="@+id/star_week_list"
android:layout_width="match_parent"
android:layout_height="56dp"
android:visibility="gone"
app:bvp_can_loop="true"
app:bvp_auto_play="true"
app:bvp_indicator_visibility="gone"
app:bvp_page_style="multi_page_scale"
app:layout_constraintBottom_toTopOf="@+id/ll_dialog_bottom_gift"/>
<LinearLayout
android:id="@+id/ll_dialog_bottom_gift"
android:layout_width="0dp"