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

update FileWidget via signal to mark as not downloaded #596

Closed
redshiftzero opened this issue Oct 28, 2019 · 3 comments
Closed

update FileWidget via signal to mark as not downloaded #596

redshiftzero opened this issue Oct 28, 2019 · 3 comments

Comments

@redshiftzero
Copy link
Contributor

redshiftzero commented Oct 28, 2019

Right now when a file is deleted locally manually on the filesystem (i.e. not via the client), we do a full API sync, which will eventually update the UI. This will work, but we could update the UI immediately without waiting for a full sync. Instead I think we should:

  • when we detect a file has been deleted, after marking it as not downloaded we emit a signal with that file's UUID
  • a slot on FileWidget then updates the UI such that the "Download" button is displayed (if the UUID matches)

Followup from #566 (comment)

@sssoleileraaa
Copy link
Contributor

sssoleileraaa commented Oct 28, 2019

Ah yes, I agree AND I think we should keep the local db synced with the local file system. Here's a little background: You can see where I added the change and why I added it. Basically, I think it makes sense to automatically look for other missing files if one file is detected missing in case there multiple files were moved because of some behind-the-scenes export or something.

I think we could still look for any missing file during a sync as well as immediately mark the file in the db as not downloaded at the time we try to export or open it (we'll need to remember there are two different places this happens when working on this ticket).

@redshiftzero
Copy link
Contributor Author

I think we could still look for any missing file during a sync as well as immediately mark the file in the db as not downloaded at the time we try to export or open it (we'll need to remember there are two different places this happens when working on this ticket).

agreed! let's do this

@eloquence
Copy link
Member

This was implemented; the client detects missing files both on sync and when opening/exporting them.

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

No branches or pull requests

3 participants