Files
Files copied to clipboard
Bug: Icon on the desktop does not update after emptying the bin
Steps to reproduce
- Empty recycle bin
- See that the icon on the desktop still looks full
Steps to fix
- Update the icon to be empty
Should this not be merged with #9195 ?
A PR (#10113) that was implementing this issue has been made, but removed for limitation issues regarding the current implementation.
A few things to keep in mind for the next person implementing the feature:
-
There are several scenarios where the icon needs to be reevaluated: -- When files are deleted into the recycle bin -- When files are being restored in the recycle bin -- When files are being deleted from the recycle bin -- When the recycle bin is entirely restored or empty
-
The icons should be taken from Constants.ImageRes.
-
The indexes for the Constants.ImageRes are namely
public const int RecycleBin = 54andpublic const int EmptyRecycleBin = 55.
It seems there is an undocumented method from Shell32.dll called SHUpdateRecycleBinIcon that could update the icon of the RecycleBin. Might be useful for that issue.