Skip to content

Conversation

gave92
Copy link
Member

@gave92 gave92 commented May 23, 2021

Resolved / Related Issues
Items resolved / related issues by this PR.

Details of Changes
Add details of changes here.

  • Adds support for automatically refresh a network folder when a file is created/deleted/renamed..
    Done using the "old" method of watching for folder changes (code taken from 0.9.2) only in case of network folders
    Note: triggers a full refresh of the folder on any change <- @duke7553 there's no way to get what's changed is there?
  • Fixes some issues with recycle bin updating:
    • Crash when the recycle bin is open in one tab and multiple files are deleted from another tab
    • "Folder empty" text sometimes not appearing/disappearing
    • Contents not updated when emptying the recycle bin

Validation
How did you test these changes?

  • Built and ran the app

@gave92 gave92 changed the title Update network fix bin Auto refresh network folders on change May 23, 2021
@gave92 gave92 force-pushed the update_network_fix_bin branch from 6a03ba6 to a1e8496 Compare May 23, 2021 18:53
@lukeblevins lukeblevins self-requested a review May 23, 2021 18:56
Copy link
Contributor

@lukeblevins lukeblevins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes are fine, but I think it would be better if we leveraged the reletiavely new TryGetChangeTracker method on StorageFolder.

It would provide more rich change descriptions and also works on any StorageFolder as of 1803.

This works a bit differently since we aren't subscribing to an event, but saves us from having to get a query result. Here's a sample authored from a Microsoft engineer: https://gist.github.com/jonwis/c61db33cc66016e6487e93acae356de3. We could use this minus the unnecessary FutureAccessList part.

@gave92 gave92 marked this pull request as draft May 23, 2021 19:01
@lukeblevins lukeblevins self-requested a review May 23, 2021 19:42
Copy link
Contributor

@lukeblevins lukeblevins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this because StorageLibraryChangeTracker doesn't work with NAS drives

@gave92 gave92 marked this pull request as ready for review May 23, 2021 19:43
@yaira2 yaira2 added the ready to merge Pull requests that are approved and ready to merge label May 23, 2021
@yaira2 yaira2 merged commit de5dd1b into files-community:main May 23, 2021
@gave92 gave92 deleted the update_network_fix_bin branch May 23, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to merge Pull requests that are approved and ready to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pasting to shared folder/mapped drive doesn't trigger refresh

3 participants