-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Code Quality: Sync the jump list with Explorer at the startup #17564
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
base: main
Are you sure you want to change the base?
Conversation
71afbb3
to
9eb7ae9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this code used at all? If not, we can remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah used.
<Extension Category="windows.updateTask" EntryPoint="Files.App.BackgroundTasks.UpdateTask" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may need to put something in place to prevent stale jumplists after updating Files or Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do the same as what we do at the startup, clear all and fetch items from Explorer.
Should we do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the update task run even if Files is closed? In that case, I think we should do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should make sure to reset our previous jump list too.
@@ -228,8 +227,6 @@ public async Task SetWorkingDirectoryAsync(string? value) | |||
|
|||
if (value == "Home" || value == "ReleaseNotes" || value == "Settings") | |||
currentStorageFolder = null; | |||
else | |||
_ = Task.Run(() => jumpListService.AddFolderAsync(value)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need a replaement from our end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above, no.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that if we don't manually add folders when opening them in Files, they won't get added to the frequent access list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah right, but do we really want to add a folder just because you browsed it? In Explorer one gets added only when you use one of some verbs (open
, for example) on a file. If you just keep clicking recursively, then all of them get added, it may be excessive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, yes. It's more useful when recently opened folders are actually displayed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That case, to keep the synchronization, we should update Explorer's jump list, then the watcher (I will create in the next PR) would notice it and update Files' one too.
What you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good. That said, I would prefer it if the watcher was included in this PR as well so that we don't have any gap in functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I totally thought I should separate into smaller PRs for easier review. But it's just adding a watcher class so should be easy to review either way. I'll implement it in this PR today.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
97999e5
to
806f922
Compare
9306256
to
c773727
Compare
Resolved / Related Issues
This PR only duplicates the Explorer's jump list and doesn't watch changes to it to sync while Files is running. It'll be implemented in the next PR.
Steps used to test these changes