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

Added Offline Caching in the Manga Page #94

Merged
merged 5 commits into from
Oct 28, 2021

Conversation

yash-k9
Copy link
Contributor

@yash-k9 yash-k9 commented Oct 23, 2021

Offline Cache added to the Manga. This functions same as the offline Anime cache

return flow {
val localData = localRepo.getAllManga()

Copy link
Owner

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.

Copy link
Contributor Author

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 ?

Copy link
Owner

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Owner

@justdvnsh justdvnsh left a 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.

Copy link
Owner

@justdvnsh justdvnsh left a 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.

@justdvnsh justdvnsh merged commit ce88274 into justdvnsh:develop Oct 28, 2021
@yash-k9
Copy link
Contributor Author

yash-k9 commented Oct 28, 2021

Thanks @justdvnsh, can you please add the hacktoberfest-accepted label to the PR

@justdvnsh
Copy link
Owner

@yash-k9 Oh, thanks for reminding. Forgot about that

@justdvnsh justdvnsh added hacktoberfest-accepted Attached when pr is ready to merge and can be counted for hacktoberfest. ready-to-merge attached when a pr is ready to be merged labels Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted Attached when pr is ready to merge and can be counted for hacktoberfest. ready-to-merge attached when a pr is ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants