房间新增H5任务完成提示

This commit is contained in:
huangjian
2022-08-02 17:33:50 +08:00
parent f4421a08f5
commit bf94e46855
8 changed files with 94 additions and 8 deletions

View File

@@ -384,6 +384,9 @@ public class CustomAttachment implements MsgAttachment {
public static final int CUSTOM_MSG_ROOM_RANK = 91;
public static final int CUSTOM_MSG_SUB_ROOM_RANK_TOP = 911;
public static final int CUSTOM_MSG_ROOM_TASK_TIPS = 92;
public static final int CUSTOM_MSG_SUB_ROOM_TASK_TIPS = 921;
/**
* 自定义消息附件的类型,根据该字段区分不同的自定义消息
*/

View File

@@ -39,6 +39,7 @@ 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.room.event.RoomTaskTipsEvent;
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;
@@ -56,6 +57,8 @@ import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUS
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_HEADER_TYPE_VISITOR;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_HEADER_TYPE_WORLD_DYNAMIC;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_MINI_WORLD;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_ROOM_TASK_TIPS;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_ROOM_TASK_TIPS;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_SUB_TYPE_VISITOR_UNREAD;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_VIP;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_VIP_SELF_OPEN;
@@ -303,7 +306,7 @@ 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){
} 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());
@@ -329,6 +332,11 @@ public class IMSystemMsgManager {
EventBus.getDefault().postSticky(new VisitorUnreadCountEvent(visitNum));
}
break;
case CUSTOM_MSG_ROOM_TASK_TIPS:
if (subType == CUSTOM_MSG_SUB_ROOM_TASK_TIPS) {
EventBus.getDefault().post(data.toJavaObject(RoomTaskTipsEvent.class));
}
break;
default:
break;
}

View File

@@ -0,0 +1,9 @@
package com.yizhuan.xchat_android_core.room.event;
import lombok.Data;
@Data
public class RoomTaskTipsEvent {
private String taskCompleteMsg;
private String taskUrl;
}