Skip to content

Fix: Update desktop Recycle Bin icon after bin operations (Fixes #9946)#18550

Open
myselfsiddharth wants to merge 1 commit into
files-community:mainfrom
myselfsiddharth:fix/recycle-bin-desktop-icon-9946
Open

Fix: Update desktop Recycle Bin icon after bin operations (Fixes #9946)#18550
myselfsiddharth wants to merge 1 commit into
files-community:mainfrom
myselfsiddharth:fix/recycle-bin-desktop-icon-9946

Conversation

@myselfsiddharth

@myselfsiddharth myselfsiddharth commented Jun 5, 2026

Copy link
Copy Markdown

Fixes #9946

Summary

The Windows desktop Recycle Bin icon now updates after recycle bin operations performed in Files.

  • Added UpdateDesktopRecycleBinIcon() to IStorageTrashBinService and implemented it in StorageTrashBinService using the existing SHUpdateRecycleBinIcon P/Invoke
  • Call icon refresh after: empty bin, restore all, send to recycle bin, restore items, and permanently delete from bin
  • Fixed RestoreAllTrashesInternal to only refresh the icon and return success when PerformOperations succeeds

Test plan

  • Move a file to the bin from Files → desktop icon shows full bin
  • Empty the bin from Files → desktop icon shows empty bin
  • Restore a file from the bin → desktop icon updates correctly
  • Permanently delete from the bin → desktop icon updates correctly
  • Restore all from the bin → desktop icon shows empty bin

@myselfsiddharth myselfsiddharth changed the title Fix: Update desktop Recycle Bin icon after bin operations Fix: Update desktop Recycle Bin icon after bin operations (Fixes #9946) Jun 5, 2026
@myselfsiddharth myselfsiddharth force-pushed the fix/recycle-bin-desktop-icon-9946 branch from faabc67 to 6e03828 Compare June 5, 2026 05:26
Call SHUpdateRecycleBinIcon after every recycle bin mutation so the Windows desktop icon reflects the current empty/full state.

Fixes files-community#9946
@myselfsiddharth myselfsiddharth force-pushed the fix/recycle-bin-desktop-icon-9946 branch from 6e03828 to 217467e Compare June 5, 2026 05:26
@yair100

yair100 commented Jun 7, 2026

Copy link
Copy Markdown
Member

Thank you for the PR. Unfortunately, the issue is still occurring on my end. Can you please upload a screen recording so I can follow the same steps you did on your end?

@yair100 yair100 added ready for review Pull requests that are ready for review changes requested Changes are needed for this pull request and removed ready for review Pull requests that are ready for review labels Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes requested Changes are needed for this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants