dynamite8 / resources-android-dev

Collection of resources for becoming an Android developer
7 stars 7 forks source link

Fixes #102 : Updated ViewModels to add LiveData and asynchronous calls #103

Closed dambadipudi closed 6 years ago

dambadipudi commented 6 years ago

Fixes #102 .

Changes proposed in this pull request: Made the calls to the Repository asynchronous so they are performed on a background thread. This is because Room does not allow any DB queries on the main thread. Because the data will be updated in a background thread, the only way for the data to propagate to the UI is by using LiveData