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

Add offline support #35

Open
rinigus opened this issue Dec 27, 2021 · 1 comment
Open

Add offline support #35

rinigus opened this issue Dec 27, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@rinigus
Copy link
Contributor

rinigus commented Dec 27, 2021

Based on "packages" PR branch.

On start, Chum refreshes the repo to display latest packages. That fails badly in offline mode. In contrast, Storeman handles it very nicely. @mentaljam - any tips?

@rinigus rinigus assigned rinigus and unassigned rinigus Dec 30, 2021
@rinigus
Copy link
Contributor Author

rinigus commented Dec 30, 2021

Looks like it is not going to be very trivial and I'd relegate it to nice-to-have features for now. Unless we start seeing users complaining about it.

In principle, it is not trivial to detect offline mode. What is suggested is to try to load some online file before operation and see if it fails. In this respect, we can let packages to get refreshed as it is now and fail accordingly.

Adding cache to NetworkManager does not help in offline case as we are hitting https://bugreports.qt.io/browse/QTBUG-52053 . So, to get offline support, we would have to implement:

  • custom cache solution that would be possible to use on errors
  • custom network query class, probably bundled with the cache mentioned above to request data from cache on failure or if cache is fresh enough
  • ideally, custom image provider backed by cache to keep app icons

All in all, significant amount of work and I feel there are more important issues to consider before.

@Olf0 Olf0 added the enhancement New feature or request label Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants