-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
Added Offline Caching in the Manga Page #94
Conversation
return flow { | ||
val localData = localRepo.getAllManga() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HI @yash-k9 please change this function to the one written in Home page caching.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @justdvnsh, should it be changed to the MangaHomeLocalRepo ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yash-k9 .
No, in this code, the data would be coming from the database. We need to fetch the data from the internet first, update the database and then show the database items to the user. Caching is only done, when there is no internet, then the user would not be shown an empty screen. Instead, they would still be having some data to see.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@justdvnsh, I've changed the function, the data flow would be in this order
Fetch Remote -> Update/Store cache Data -> Emit Stored Data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @justdvnsh, Are there any changes that are required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yash-k9 Please make the required changes. Thank you for the contributions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yash-k9 Yeah. These were the changes. Thanks for the update and contributions.
Thanks @justdvnsh, can you please add the hacktoberfest-accepted label to the PR |
@yash-k9 Oh, thanks for reminding. Forgot about that |
Offline Cache added to the Manga. This functions same as the offline Anime cache