Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetworkBoundResource class: Issues to build logic for loading data from the network #2

Open
VictoriousAttitude opened this issue Jul 19, 2020 · 0 comments

Comments

@VictoriousAttitude
Copy link

VictoriousAttitude commented Jul 19, 2020

My question is based on this diagram which shows the decision tree for NetworkBoundResource class: https://developer.android.com/jetpack/guide

Main logic behind fetching data from the database or from the network is that we observe if our database is empty in the first place, but according to your logic we are fetching data from the internet & immediately saving results to the database in NetworkBoundResource class. Also there's no logic behind how we fetch shouldFetch() = true always.

@anitaa1990 Can you clarify here please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant