caarmen / poet-assistant

Android app with rhyming dictionary, thesaurus, and dictionary, with text-to-speech functionality to read your poem.
Other
83 stars 11 forks source link

Use RxLoader instead of AsyncTaskLoader. #6

Closed caarmen closed 7 years ago

caarmen commented 8 years ago

I can't wait to add RxJava to my app!

The scope of this PR is limited to just to replace AsyncTaskLoader with RxLoader. Minimal changes are done to have a minimal diff, to better see where RxLoader logic replaces AsyncTaskLoader logic.

One change in particular is that previously, the ListFragment was creating a new AsyncTaskLoader instance every time a query was performed. The AsyncTaskLoader constructor had the query arguments. Now, the same RxLoader instance exists throughout the life of the ListFragment, but its main method is invoked with the query arguments.

What I like: