-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Desktop: Resolves issue #12039: Checks whether there exists a deleted folder in order to determine if Trash is collapsible #12051
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
base: dev
Are you sure you want to change the base?
Conversation
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
Thanks for looking into it. Does that also collapse/expand the nested notebooks inside the trash folder? |
Also it would be good to add tests if possible. I seem to remember I've added some for the collapse/expand logic |
In response to your first question, yes all folders inside of Trash are also collapsed/expanded. |
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.
Thank you for working on this (and adding tests)!
I've left two comments.
Remove auto generated file
…in the future it will still be found by recusively going over all folders and sub folder
All issues should now be resolved, let me know if there is anything else |
@personalizedrefrigerator Please let me know if there are any other changes needed/desired. |
The new approach simply checks if there exists a folder with a deleted_time.
It seems that the only aspect influencing whether Trash is collapsible is the presence of a folder.
If this is to change, then its likely this information can be found in the store.
There are also a few safeguards implemented.
FIrstly, if the issue of the Trash folder.childern.size reporting 0 regardless is resolved, it will simply skip over this addition.
Secondly, by breaking as soon as proof is found Trash contains a folder any unnecessary iterations are prevented.
Using the store might allow for determining the number of items in the Trash, something that was commented to be considered tricky. Although I assume communication regarding this subject should be moved to the forum.
Following is a visual explanation of the new behaviour:
By clicking the collapse all button its now possible to go between the following two states:


See issue #12039 for more information regarding the bug that's resolved.