levibostian / Wendy-Android

Build offline first Android mobile apps. Remove loading screens, perform tasks instantly.
https://levibostian.github.io/Wendy-Android/wendy/
MIT License
64 stars 16 forks source link

Allow object to register for pending API task updates. #5

Closed levibostian closed 7 years ago

levibostian commented 7 years ago

The pending API task runner right now does not give any notification to the application when it is running or what it is running.

Use case: I am creating a chat application that has UI for when the chat message is sending to the API, when it fails, when it succeeds. Right now with Wendy, I create a pending API task model for the chat message but have no idea when it is running or done. I know the number of pending API tasks for the model it is working on, but that is (1) not accurate and (2) does not tell me when a task is running.

Maybe when a task runs, we have the PendingApiTask give us the model it represents and calls an interface function on it giving it a status update allowing it to change a value on it's model. Or, we change that model status value for it.

levibostian commented 7 years ago

Done via https://github.com/curiosityio/Wendy/issues/6