Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Feature: Recycle Bin changing icons in the side bar #10113
Feature: Recycle Bin changing icons in the side bar #10113
Changes from 26 commits
78cb382
3b190f1
ffcdccc
9fe3f7c
0067b32
facacc9
6f4ff9d
c0cd9c3
7717072
aa18a4f
df88672
5f7e8ef
aadac84
72efbe3
ac395c3
d7fe441
4279f2d
f659904
1f3c2ec
0fe3b19
08fe06f
06766d6
931768e
61b1287
db44a48
8b7c9ee
8bc21f2
d78cf52
3eb2d23
cb89ba3
40ef8b8
abd8775
d1042ca
ad402df
e898abf
4e7a95e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
You can use null check
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.
Changed inside the function that handles the event raising. But would you rather have the event raised directly without any method maybe?
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.
Yes. There's no need for additional method to raise this event
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 actuallty do need it to raise the event outside of the class. We need to raise it from
RestoreItemsFromTrashAsync
andDeleteItemsAsync
fromFilesystemHelpers.cs
.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.
@d2dyno1 Should I do something to indeed remove the need of the method entirely or should it stay that way?
Removing it would means to move methods from the
FileSystemHelpers
to theRecycleBinHelpers
, albeit it wouldn't be their optimal locations.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 moving it would make sense (?). In addition, it should be moved to instantiable helper (because it exposes an event) but that'd be part of a bigger refactor out of scope for this PR.
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 moving it is better and good
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.
Not sure how to actually implement this. I have been turning the issue in my head for the past few days, but I cannot find a solution that feels actually clean for it. Consider this message as a formal request for help.
After giving it some thoughts, the methods from
FilesystemHelpers.cs
should not be moved. They are in their right places, they are not only linked to the recycle bin.A possibility would to raise events in
FilesystemHelpers.cs
whenDelete
orRestore
are called, and have methods to update the recycle bin icon subscribe to them. But then, an issue comes from the RecycleBinHelpers.EmptyRecycleBin() method that does not use theDelete
method to clear the recycle bin.I must be missing something obvious, and I'd like to see this PR through.