Wendy-Android
Wendy-Android copied to clipboard
Add a `groupId` listener
From the discussion in this issue, adding a global listener for a specific groupId
would be beneficial to be able to listen to a group of tasks and when they will all be complete.
Tasks to help you get started:
- [ ] Create a listener interface with the listeners
- [ ] Create callback functions for:
runningTask(task: PendingTask)
,fun allTasksComplete()
,fun taskDoneRunning(taskId: Long, successful: Boolean, numberTasksLeftInGroup: Int)
- [ ] Create callback functions for:
- [ ] Add function in
WendyConfig
to add a listener to a group by id- [ ] When listener added, trigger a callback with the current status of the groupId like done in other add listener functions.
- [ ] Add function to remove listener
- [ ] Call callbacks in the task runner.