新增新用户充值礼物弹窗
This commit is contained in:
@@ -64,6 +64,7 @@ public class DemoCache {
|
||||
private static final String KEY_BGM_SINGLE_CYCLE = "key_bgm_single_cycle";
|
||||
private static final String KEY_SINGLE_ROOM_TIP = "key_single_room_tip";
|
||||
private static final String KEY_NEW_USER_GIFT = "key_new_user_gift";
|
||||
private static final String KEY_NEW_USER_CHARGE_GIFT = "key_new_user_charge_gift";
|
||||
/**
|
||||
* 保存网页域名
|
||||
*/
|
||||
@@ -358,11 +359,23 @@ public class DemoCache {
|
||||
}
|
||||
|
||||
public static void saveNewUserGift(boolean value) {
|
||||
SettingsPref.instance(BasicConfig.INSTANCE.getAppContext()).putBoolean(KEY_SINGLE_ROOM_TIP , value);
|
||||
SettingsPref.instance(BasicConfig.INSTANCE.getAppContext()).putBoolean(KEY_NEW_USER_GIFT , value);
|
||||
}
|
||||
|
||||
public static Boolean readNewUserGift() {
|
||||
return SettingsPref.instance(BasicConfig.INSTANCE.getAppContext()).getBoolean(KEY_SINGLE_ROOM_TIP, true);
|
||||
return SettingsPref.instance(BasicConfig.INSTANCE.getAppContext()).getBoolean(KEY_NEW_USER_GIFT, true);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param value 0初始值 1 需要弹窗 2 不需要弹窗
|
||||
*/
|
||||
public static void saveNewUserChargeGift(int value) {
|
||||
SettingsPref.instance(BasicConfig.INSTANCE.getAppContext()).putInt(KEY_NEW_USER_CHARGE_GIFT , value);
|
||||
}
|
||||
|
||||
public static int readNewUserChargeGift() {
|
||||
return SettingsPref.instance(BasicConfig.INSTANCE.getAppContext()).getInt(KEY_NEW_USER_CHARGE_GIFT, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -335,6 +335,7 @@ public class CustomAttachment implements MsgAttachment {
|
||||
//首充礼包
|
||||
public static final int CUSTOM_MSG_FIRST_CHARGE = 76;
|
||||
public static final int CUSTOM_MSG_SUB_FIRST_CHARGE_PRIZE = 761;
|
||||
public static final int CUSTOM_MSG_SUB_NEW_USER_CHARGE_PRIZE = 762;
|
||||
//访客未读
|
||||
public static final int CUSTOM_MSG_HEADER_TYPE_VISITOR = 78;
|
||||
public static final int CUSTOM_MSG_SUB_TYPE_VISITOR_UNREAD = 781;
|
||||
|
@@ -38,6 +38,7 @@ import com.yizhuan.xchat_android_core.pay.bean.FirstChargeGoods;
|
||||
import com.yizhuan.xchat_android_core.pay.event.ChargeCustomNotificationEvent;
|
||||
import com.yizhuan.xchat_android_core.pay.event.FirstChargeEvent;
|
||||
import com.yizhuan.xchat_android_core.pay.event.FirstRechargeEvent;
|
||||
import com.yizhuan.xchat_android_core.pay.event.NewUserChargeEvent;
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||
import com.yizhuan.xchat_android_core.user.UserModel;
|
||||
@@ -302,6 +303,12 @@ public class IMSystemMsgManager {
|
||||
event.setChargeProdTitle(firstChargeGoods.getChargeProdTitle());
|
||||
event.setFirstChargeRewardList(firstChargeGoods.getFirstChargeRewardList());
|
||||
EventBus.getDefault().post(event);
|
||||
}else if (subType == CustomAttachment.CUSTOM_MSG_SUB_NEW_USER_CHARGE_PRIZE){
|
||||
FirstChargeGoods firstChargeGoods = data.toJavaObject(FirstChargeGoods.class);
|
||||
NewUserChargeEvent event = new NewUserChargeEvent();
|
||||
event.setChargeProdTitle(firstChargeGoods.getChargeProdTitle());
|
||||
event.setFirstChargeRewardList(firstChargeGoods.getFirstChargeRewardList());
|
||||
EventBus.getDefault().post(event);
|
||||
}
|
||||
break;
|
||||
case CUSTOM_MSG_VIP:
|
||||
|
@@ -14,4 +14,5 @@ public class FirstChargeGoods {
|
||||
private String chargeProdTitle;
|
||||
private ArrayList<FirstChargeReward> firstChargeRewardList;
|
||||
private String giveMoney;
|
||||
private boolean finish;
|
||||
}
|
||||
|
@@ -0,0 +1,14 @@
|
||||
package com.yizhuan.xchat_android_core.pay.event;
|
||||
|
||||
|
||||
import com.yizhuan.xchat_android_core.pay.bean.FirstChargeReward;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class NewUserChargeEvent {
|
||||
private String chargeProdTitle;
|
||||
private ArrayList<FirstChargeReward> firstChargeRewardList;
|
||||
}
|
@@ -273,6 +273,13 @@ public class UserInfo implements Serializable {
|
||||
@Setter
|
||||
private String iosBubbleUrl;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean showLimitCharge;
|
||||
@Getter
|
||||
@Setter
|
||||
private long limitChargeEndTime;
|
||||
|
||||
public UserInfo() {
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user