When I implement a download list through epoxy, there is a progress bar in each item in the list to indicate the download progress of the current item. Then when calling setData frequently, the progress bar is only updated when the progress reaches 100%. Before reaching 100%, in the requestDelayedModelBuild method, requestedModelBuildType == RequestedModelBuildType.NEXT_FRAME, it is returned directly.
withState(viewModel) { state -> Log.d("download","item progress in with state:${task.progress}") val list = state.result.invoke()?.update({it.copy(progress = task.progress)}, {it.key == task.key}) ?: arrayListOf() controller.setData(list) }
When I implement a download list through epoxy, there is a progress bar in each item in the list to indicate the download progress of the current item. Then when calling setData frequently, the progress bar is only updated when the progress reaches 100%. Before reaching 100%, in the requestDelayedModelBuild method, requestedModelBuildType == RequestedModelBuildType.NEXT_FRAME, it is returned directly.
withState(viewModel) { state -> Log.d("download","item progress in with state:${task.progress}") val list = state.result.invoke()?.update({it.copy(progress = task.progress)}, {it.key == task.key}) ?: arrayListOf() controller.setData(list) }