【埋点】福利任务完成事件应该是完成一个任务就上报一条,目前是全部完成了才会上报一条
This commit is contained in:
parent
38e13bf461
commit
91260dc651
|
|
@ -90,8 +90,8 @@ class BoxTaskHelper: BaseTaskHelper<TaskStateBoxRoot, BoxTaskRoot>() {
|
||||||
if (taskType == subTask.task_type
|
if (taskType == subTask.task_type
|
||||||
&& !isBoxSubTaskFinished(currentBoxIndex, index)) {
|
&& !isBoxSubTaskFinished(currentBoxIndex, index)) {
|
||||||
subTask.finishedNum++
|
subTask.finishedNum++
|
||||||
if (isBoxTasksFinished(currentBoxIndex)) {
|
if (subTask.required_count <= subTask.finishedNum) {
|
||||||
sendSubBoxFinishEvent(currentBoxIndex)
|
sendSubBoxSubTaskFinishEvent(index, subTask)
|
||||||
}
|
}
|
||||||
saveState2Sp()
|
saveState2Sp()
|
||||||
notifyEvent()
|
notifyEvent()
|
||||||
|
|
@ -131,14 +131,9 @@ class BoxTaskHelper: BaseTaskHelper<TaskStateBoxRoot, BoxTaskRoot>() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun sendSubBoxFinishEvent(index: Int) {
|
private fun sendSubBoxSubTaskFinishEvent(index: Int, subTask: TaskStateBoxSub) {
|
||||||
val subBox = getBoxState(index)
|
|
||||||
|
|
||||||
subBox?.let {
|
|
||||||
val resetBoxCount = mStateBean.boxList.size - index - 1
|
|
||||||
StatisticUtil.reportEvents(StatisticUtil.KEY_Welfare_Task_Click,
|
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"))
|
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() {
|
private fun notifyEvent() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue