Files icon indicating copy to clipboard operation
Files copied to clipboard

Bug: Icon on the desktop does not update after emptying the bin

Open yaira2 opened this issue 1 year ago • 3 comments

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

yaira2 avatar Sep 08 '22 02:09 yaira2

Should this not be merged with #9195 ?

hecksmosis avatar Jan 03 '23 16:01 hecksmosis

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 = 54 and public const int EmptyRecycleBin = 55.

QuaintMako avatar Jan 03 '23 17:01 QuaintMako

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.

QuaintMako avatar Mar 05 '23 20:03 QuaintMako