Skip to content
This repository has been archived by the owner on Sep 4, 2018. It is now read-only.

Cache package list #325

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

guillaumealgis
Copy link
Member

Fixes #143. Crosses off an item in #201.

This saves the package list in ~/Library/Caches/com.mneorr.Alcatraz/packages.plist after the first successful package.json download (and updates it after each successful reload).
Once the package list is on disk, it will be loaded on subsequents Alcatraz launches, before an attempt is made to get the fresh json from Github. This results is instantly displayed packages at launch, even without network.

The package list is stored as binary plist for efficiency and ease of use, but JSON could be considered to keep the same format as Github. Let me know.

@guillaumealgis
Copy link
Member Author

Rebased this PR on top of master. Could you take a look? Thanks!

@jurre
Copy link
Collaborator

jurre commented Sep 27, 2015

I definitely like the idea of caching the package list, @supermarin what do you think?

@supermarin
Copy link
Collaborator

Thanks for rebasing @guillaume-algis, this seems great!

Just to check before merging - what happens when you start scrolling or searching on a bad connection and the tableview reloads?
e.g. does it preserve the scroll state and filter state?

@guillaumealgis
Copy link
Member Author

Good catch. The table view lost its content offset after a reload, as the delegate was always recreated.
This is fixed in 14bf5be.

The search & filters state are preserved.

I'm not quite sure what kind of UI we should display for the install buttons, though. For the moment, they appear as if you were online, but attempting to install anything will fail 😕

@jurre
Copy link
Collaborator

jurre commented Jan 7, 2016

We could disable the buttons and show a no internet connection warning somewhere I guess?

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

Successfully merging this pull request may close these issues.

3 participants