Skip to content

Disabled dragging in recycle bin #9323

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

Merged

Conversation

IgorKordiukiewicz
Copy link
Contributor

Resolved / Related Issues
Fixes #7640

Details of Changes
Dragging items in the recycle bin is now disabled.

Validation

  • Built and ran the app

@gave92
Copy link
Member

gave92 commented Jun 3, 2022

The point is not to prevent dragging files from recycle bin, as you can restore items that way. Point is to disallow dropping items onto folders contained in recycle bin. Good place to do that is in InitializeDrag() method of BaseLayout. Something like if ((item.PrimaryItemAttribute == StorageItemTypes.Folder && !item.IsRecycleBinItem) || item.IsExecutable).

@gave92 gave92 marked this pull request as draft June 3, 2022 20:43
@IgorKordiukiewicz IgorKordiukiewicz force-pushed the disable-recycle-bin-drag branch from b494599 to 031fa4c Compare June 4, 2022 12:14
@IgorKordiukiewicz
Copy link
Contributor Author

Updated.
if ((item.PrimaryItemAttribute == StorageItemTypes.Folder && !item.IsRecycleBinItem) || item.IsExecutable) isn't working because IsRecycleBinItem is false even for folders in the recycle bin.

@IgorKordiukiewicz IgorKordiukiewicz marked this pull request as ready for review June 4, 2022 13:26
@gave92 gave92 added the ready to merge Pull requests that are approved and ready to merge label Jun 4, 2022
@yaira2 yaira2 merged commit 100d3db into files-community:main Jun 8, 2022
@IgorKordiukiewicz IgorKordiukiewicz deleted the disable-recycle-bin-drag branch June 8, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Pull requests that are approved and ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

File/folder in the recycle bin can be added to other folders in it
3 participants