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

File sync logic and associated UI indicators #5

Closed
kphurley opened this issue Jul 11, 2021 · 3 comments · Fixed by #11
Closed

File sync logic and associated UI indicators #5

kphurley opened this issue Jul 11, 2021 · 3 comments · Fixed by #11

Comments

@kphurley
Copy link
Owner

@kphurley
Copy link
Owner Author

This requires a way for the main process to communicate with the renderer process. It seems like the preferred way to do this is with contextBridge. See this issue in the electron repo with examples: electron/electron#9920 (comment)

@kphurley
Copy link
Owner Author

Ok, I at least got it sending from renderer to main, so we just need to get it working in reverse. Looks like we will

  • Set the state as "synching"
  • Send the URLs over to the main process
  • Download the contents at those URLs and extract them to a data structure in memory
  • Compare each file with what's there already in the indicated directory
  • Send back any urls not found
  • Set the UI state to either data available or up to date as appropriate

@kphurley
Copy link
Owner Author

It seems like adm-zip only works if the file is already on disk. I wonder now if we should just maintain a local cache of all of the zips on disk regardless, and just use the UI as a way to get the desired files to the location specified.

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

Successfully merging a pull request may close this issue.

1 participant