【埋点】福利任务完成事件应该是完成一个任务就上报一条,目前是全部完成了才会上报一条

This commit is contained in:
renhaoting 2026-01-23 17:50:12 +08:00
parent 38e13bf461
commit 91260dc651
1 changed files with 5 additions and 10 deletions

View File

@ -90,8 +90,8 @@ class BoxTaskHelper: BaseTaskHelper<TaskStateBoxRoot, BoxTaskRoot>() {
if (taskType == subTask.task_type
&& !isBoxSubTaskFinished(currentBoxIndex, index)) {
subTask.finishedNum++
if (isBoxTasksFinished(currentBoxIndex)) {
sendSubBoxFinishEvent(currentBoxIndex)
if (subTask.required_count <= subTask.finishedNum) {
sendSubBoxSubTaskFinishEvent(index, subTask)
}
saveState2Sp()
notifyEvent()
@ -131,14 +131,9 @@ class BoxTaskHelper: BaseTaskHelper<TaskStateBoxRoot, BoxTaskRoot>() {
}
}
private fun sendSubBoxFinishEvent(index: Int) {
val subBox = getBoxState(index)
subBox?.let {
val resetBoxCount = mStateBean.boxList.size - index - 1
StatisticUtil.reportEvents(StatisticUtil.KEY_Welfare_Task_Click,
mapOf("total_amount" to it.reward_value, "chest_count" to resetBoxCount, "task_type" to "subBox", "task_progress" to "100"))
}
private fun sendSubBoxSubTaskFinishEvent(index: Int, subTask: TaskStateBoxSub) {
StatisticUtil.reportEvents(StatisticUtil.KEY_Welfare_Task_Click,
mapOf(/*"total_amount" to it.reward_value, "chest_count" to resetBoxCount, */"task_type" to subTask.task_type, "task_progress" to subTask.task_id))
}
private fun notifyEvent() {