-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Fix: Don't clear multiselect on hover if the item is part of the selection #11873
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
Fix: Don't clear multiselect on hover if the item is part of the selection #11873
Conversation
This isn't desired, if multiple items are already selected, we should ignore the select on hover feature. |
That makes sense, i have updated the code accordingly and also the video where I tested the changes in the PR description |
|
I think this can be simplified by modifying the if statement on line 1101 to return if multiple files are selected. |
That was also my first thought, but then it wouldn't work to select multiple items by pressing Shift or Control. The code for that is between line 1116 and 1136. This condition even expects that at least one item is selected https://github.com/files-community/Files/blob/main/src/Files.App/BaseLayout.cs#L1121 |
yaira2
left a comment
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.
Looks good to me, can you add some comments to the code?
I added some basic comments, I think the other parts are pretty self explaining or is there any specific part where I should add a comment? |
|
Looks good, thanks! |
Resolved / Related Issues
Closes Bug: Multiselect is getting cleared when select on hover is enabled #11867
Validation
How did you test these changes?
Screenshots (optional)
Files_e8IZ9jm00I.mp4
Notes
The first commit inverts two conditions and uses
returnto save some indentationThe second commit is the actual fix