1.福袋玩法说明增加giftId参数
2.快捷发言关闭后第二天才再次展示
This commit is contained in:
@@ -118,6 +118,7 @@ import com.yizhuan.tutu.music.widget.MusicPlayerView;
|
||||
import com.yizhuan.tutu.room_chat.activity.RoomInviteFansActivity;
|
||||
import com.yizhuan.tutu.room_chat.activity.RoomMsgActivity;
|
||||
import com.yizhuan.xchat_android_core.Constants;
|
||||
import com.yizhuan.xchat_android_core.DemoCache;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.bean.RoomMicInfo;
|
||||
import com.yizhuan.xchat_android_core.bean.RoomQueueInfo;
|
||||
@@ -933,7 +934,7 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
private long lastSendTime;
|
||||
private void initSpeedyMessage() {
|
||||
List<String> phrases = AvRoomDataManager.get().phrases;
|
||||
if (ListUtils.isListEmpty(phrases)) {
|
||||
if (ListUtils.isListEmpty(phrases) || !TimeUtils.isTomorrow(DemoCache.readSpeedyMessageGoneTime())) {
|
||||
gameBinding.flSpeedyMessage.setVisibility(View.GONE);
|
||||
return;
|
||||
}
|
||||
@@ -964,7 +965,10 @@ public class HomePartyRoomFragment extends BaseMvpFragment<IHomePartyView, HomeP
|
||||
}
|
||||
|
||||
});
|
||||
gameBinding.ivCloseSpeedyMessage.setOnClickListener(v -> gameBinding.flSpeedyMessage.setVisibility(View.GONE));
|
||||
gameBinding.ivCloseSpeedyMessage.setOnClickListener(v -> {
|
||||
gameBinding.flSpeedyMessage.setVisibility(View.GONE);
|
||||
DemoCache.saveSpeedyMessageGoneTime(System.currentTimeMillis());
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -1,17 +1,23 @@
|
||||
package com.yizhuan.erban.ui.widget;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
|
||||
import androidx.lifecycle.Observer;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialog;
|
||||
|
||||
import androidx.viewpager.widget.PagerAdapter;
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
@@ -398,7 +404,6 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
goldWalletInfo = PayModel.get().getCurrentWalletInfo();
|
||||
|
||||
|
||||
|
||||
//首充逻辑
|
||||
//updateFirstRechargeStatus();
|
||||
|
||||
@@ -660,37 +665,37 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
}
|
||||
current = currentGiftInfoList.get(0);
|
||||
etSendMessage.setVisibility(current.isSendMsg() ? View.VISIBLE : View.GONE);
|
||||
tvLuckyBagIntro.setVisibility(current.getGiftType() == GiftType.GIFT_TYPE_LUCKY?View.VISIBLE:View.GONE);
|
||||
tvLuckyBagIntro.setVisibility(current.getGiftType() == GiftType.GIFT_TYPE_LUCKY ? View.VISIBLE : View.GONE);
|
||||
|
||||
pagerList = beanTransformVm(context, currentGiftInfoList, isKnap, 8);
|
||||
setGridViewData(pagerList);
|
||||
if (isKnap){
|
||||
if (isKnap) {
|
||||
tvGiftValue.setVisibility(View.VISIBLE);
|
||||
easyPopup.getView(R.id.number_all).setVisibility(View.VISIBLE);
|
||||
initEasyPop(true);
|
||||
updateTotalPrice();
|
||||
}else {
|
||||
} else {
|
||||
tvGiftValue.setVisibility(View.GONE);
|
||||
initEasyPop(false);
|
||||
if (giftNumber == -1){
|
||||
if (giftNumber == -1) {
|
||||
updateNumber(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void updateTotalPrice(){
|
||||
private void updateTotalPrice() {
|
||||
String diamond = "";
|
||||
double totalValue = 0;
|
||||
for (int i = 0; i < currentGiftInfoList.size(); i++) {
|
||||
totalValue += currentGiftInfoList.get(i).getCount() * currentGiftInfoList.get(i).getGoldPrice();
|
||||
}
|
||||
if (totalValue >= 10000){
|
||||
totalValue = totalValue/10000.0f;
|
||||
diamond = FormatUtils.formatBigDecimal(totalValue)+"W+";
|
||||
}else {
|
||||
if (totalValue >= 10000) {
|
||||
totalValue = totalValue / 10000.0f;
|
||||
diamond = FormatUtils.formatBigDecimal(totalValue) + "W+";
|
||||
} else {
|
||||
diamond = String.valueOf(totalValue);
|
||||
}
|
||||
tvGiftValue.setText("总价值:"+diamond+"钻石");
|
||||
tvGiftValue.setText("总价值:" + diamond + "钻石");
|
||||
}
|
||||
|
||||
private void showEmptyView() {
|
||||
@@ -785,7 +790,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
((GiftInfoVm) LastSelectedItem).isSelect.set(false);
|
||||
}
|
||||
}
|
||||
tvLuckyBagIntro.setVisibility(giftInfoVm.data.getGiftType() == GiftType.GIFT_TYPE_LUCKY?View.VISIBLE:View.GONE);
|
||||
tvLuckyBagIntro.setVisibility(giftInfoVm.data.getGiftType() == GiftType.GIFT_TYPE_LUCKY ? View.VISIBLE : View.GONE);
|
||||
giftInfoVm.isSelect.set(true);
|
||||
LastSelectedItem = item;
|
||||
current = giftInfoVm.data;
|
||||
@@ -838,7 +843,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
//房间送礼面板
|
||||
giftInfos = GiftModel.get().getGiftInfosByType(roomUid, GiftType.GIFT_TYPE_NORMAL);
|
||||
//加入福袋礼物到房间礼物列表
|
||||
giftInfos.addAll(0,GiftModel.get().getGiftInfosByType(roomUid, GiftType.GIFT_TYPE_LUCKY));
|
||||
giftInfos.addAll(0, GiftModel.get().getGiftInfosByType(roomUid, GiftType.GIFT_TYPE_LUCKY));
|
||||
} else {
|
||||
// 私聊送礼面板 不在房间内,直接在普通的列表里选出房间礼物进行显示
|
||||
giftInfos = GiftModel.get().getGiftInfoList(GiftType.GIFT_TYPE_NORMAL);
|
||||
@@ -887,7 +892,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
easyPopup.getView(R.id.number_188).setOnClickListener(this);
|
||||
easyPopup.getView(R.id.number_520).setOnClickListener(this);
|
||||
easyPopup.getView(R.id.number_1314).setOnClickListener(this);
|
||||
if (isBag){
|
||||
if (isBag) {
|
||||
easyPopup.getView(R.id.number_all).setVisibility(View.VISIBLE);
|
||||
easyPopup.getView(R.id.number_all).setOnClickListener(this);
|
||||
} else {
|
||||
@@ -1033,7 +1038,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
micMemberInfo.setUid(uid);
|
||||
targetUids.add(micMemberInfo);
|
||||
Log.e(TAG, "onClick: indicator type: " + giftIndicator.getCurrrentType());
|
||||
giftDialogBtnClickListener.onSendGiftBtnClick(current, targetUids, giftNumber == -1?current.getCount():giftNumber, giftMessage,
|
||||
giftDialogBtnClickListener.onSendGiftBtnClick(current, targetUids, giftNumber == -1 ? current.getCount() : giftNumber, giftMessage,
|
||||
giftIndicator.getCurrrentType() == GiftIndicator.TYPE_KNAP, false,
|
||||
new SenGiftCallback() {
|
||||
@Override
|
||||
@@ -1060,7 +1065,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
targetUids.add(micMemberInfo);
|
||||
Log.e(TAG, "onClick: indicator type: " + giftIndicator.getCurrrentType());
|
||||
giftDialogBtnClickListener.onSendGiftBtnClick(current, targetUids,
|
||||
giftNumber == -1?current.getCount():giftNumber, giftMessage,
|
||||
giftNumber == -1 ? current.getCount() : giftNumber, giftMessage,
|
||||
giftIndicator.getCurrrentType() == GiftIndicator.TYPE_KNAP,
|
||||
false,
|
||||
new SenGiftCallback() {
|
||||
@@ -1090,7 +1095,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
sendGiftButton.setEnabled(true);
|
||||
return;
|
||||
}
|
||||
giftDialogBtnClickListener.onSendGiftBtnClick(current, selectedMembers, giftNumber == -1?current.getCount():giftNumber, giftMessage,
|
||||
giftDialogBtnClickListener.onSendGiftBtnClick(current, selectedMembers, giftNumber == -1 ? current.getCount() : giftNumber, giftMessage,
|
||||
giftIndicator.getCurrrentType() == GiftIndicator.TYPE_KNAP,
|
||||
avatarListAdapter.getSelectType() == GiftAvatarAdapter.SELECT_TYPE_WHOLE_MIC,
|
||||
new SenGiftCallback() {
|
||||
@@ -1176,7 +1181,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
break;
|
||||
|
||||
case R.id.tv_lucky_bag_intro:
|
||||
DialogWebViewActivity.start(context, UriProvider.getLuckyBagRule(),true);
|
||||
DialogWebViewActivity.start(context, UriProvider.getLuckyBagRule() + "?giftId=" + current.getGiftId(), true);
|
||||
break;
|
||||
|
||||
case R.id.tv_reload:
|
||||
@@ -1323,7 +1328,7 @@ public class GiftDialog extends BottomSheetDialog implements View.OnClickListene
|
||||
|
||||
private void updateNumber(int number) {
|
||||
giftNumber = number;
|
||||
giftNumberText.setText(giftNumber == -1?"all":giftNumber + "");
|
||||
giftNumberText.setText(giftNumber == -1 ? "all" : giftNumber + "");
|
||||
easyPopup.dismiss();
|
||||
}
|
||||
|
||||
|
@@ -63,6 +63,17 @@ public class DemoCache {
|
||||
*/
|
||||
private static final String KEY_INIT_DATA_API_HOST = "InitDataApiHost";
|
||||
|
||||
private static final String KEY_SPEEDY_MESSAGE_GONE_TIME = "SpeedyMessageGoneTime";
|
||||
|
||||
public static Long readSpeedyMessageGoneTime() {
|
||||
return (Long) ObjectPref.instance(BasicConfig.INSTANCE.getAppContext()).get(KEY_SPEEDY_MESSAGE_GONE_TIME, System.currentTimeMillis());
|
||||
}
|
||||
|
||||
public static void saveSpeedyMessageGoneTime(Long savingTime) {
|
||||
ObjectPref.instance(BasicConfig.INSTANCE.getAppContext()).put(KEY_SPEEDY_MESSAGE_GONE_TIME, savingTime);
|
||||
}
|
||||
|
||||
|
||||
public static Map<String, NobleRight> readNobleRights() {
|
||||
String string = SettingsPref.instance(BasicConfig.INSTANCE.getAppContext()).getString(KEY_INIT_DATA_NOBLE_RIGHTS, null);
|
||||
if (TextUtils.isEmpty(string)) return null;
|
||||
|
Reference in New Issue
Block a user