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 `.clear()` to be async and sync. #44

Closed levibostian closed 6 years ago

levibostian commented 6 years ago

The .clear() function in Wendy is currently setup to only run asynchronously. However, I see a purpose when you would like it to run synchronously.

So, I would like to create both.

levibostian commented 6 years ago

Many APIs that provide async and sync options for functions have 2 separate functions. 1 that is sync and 1 that is async. 2 separate functions.

I could pull out the functionality of deleting the Wendy data out of the AsyncTask, move it into the sync function, then have the AsyncTask simply call the sync function and have it run in an async way.