Open ashrafi opened 5 years ago
Good point,
I am not sure how convenient it is, but I agree that it's gonna be helpful for sure.
After adding some sort of network interaction in the app, ViewModels will also have error handling for that along with getting the data from multiple source based on the conditions. Which means we will have some logic in ViewModel to unit test. Right now viewmodels don't have much logic in them.
We need a good example of how Jetpack should be designed for both online and offline. The Repository should get all the info from Firestore and update the Room DB with LiveData.
Writing a robust offline Repository would be a good addition to this example