sunflower icon indicating copy to clipboard operation
sunflower copied to clipboard

Can add Firestore to the Repository?

Open ashrafi opened this issue 6 years ago • 1 comments

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

ashrafi avatar Jan 21 '19 00:01 ashrafi

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.

ashraf-patel avatar Nov 10 '19 05:11 ashraf-patel