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
Offline functionality #14
Comments
Yup, would be nice. Can you tell me a bit more about your use case? Do you think the app should just cache the responses of all the pages you've visited, or should it also have a way to greedily retrieve comments of stories you have not opened (yet) to allow for a more fully-featured offline experience? |
My usecase is reading HN whilst I have no internet access due to being on a train underground, which is up to an hour on certain days. Just caching all headlines + the comments of visited pages would be sufficient for me really. There's a similar option on a Reddit app I use to schedule retrieving all comments and posts of a subreddit, but I don't use it because I don't feel a need for it to download so many posts from so many subreddits at least once a day. With HN it's far less posts so maybe in this case I might enable it if it were an option, not sure though. |
Chiming in to say that I'd love to see this getting implemented. My use-case would be similar to Victor239, but I'd prefer the ability to schedule download all posts and comments (maybe give a configuration option to select how many stories does the user want to save for each category). Since this is all text, caching would not put a whole lot of dent into the storage space also. Thanks for building this app btw! I just came across it on Fdroid, played around with it a bit and instantly fell in love. Kudos! 💯 |
Offline functionality has been implemented in db8f65d and 1260819. The app will cache every successful HTTP GET request during normal use for a period of 7 days. When any HTTP error occurs (which happens not only when the user is offline, but also when, for instance, the Hacker News server is down) this cache will be used as a fallback. The relevant item will gain an icon to indicate it's pulled from the cache. In addition, if the app detects that the user is not connected to any network, a banner will be shown to indicate that information may not be up-to-date. I'll release a new app version that includes this change soon. I'm still working on the best way of exposing the preloading part that @thelazyoxymoron requested. A relatively easy way would be to make it a manual action accessed from the menu: Scheduling is an option, but introduces a number of additional complexities:
|
It would be great if the headlines and comments were cached so that if you open the app whilst offline you can still read them. If online however it would automatically refresh as per usual.
The text was updated successfully, but these errors were encountered: