mirror of
https://github.com/zadam/trilium.git
synced 2024-11-10 17:13:45 +08:00
collapse/expand only folder notes
This commit is contained in:
parent
9be1d1f697
commit
742df25bc2
4 changed files with 15 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="JSUnfilteredForInLoop" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="SpellCheckingInspection" enabled="false" level="TYPO" enabled_by_default="false">
|
||||
<option name="processCode" value="true" />
|
||||
<option name="processLiterals" value="true" />
|
||||
|
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -3345,9 +3345,9 @@
|
|||
}
|
||||
},
|
||||
"electron": {
|
||||
"version": "9.0.0-beta.21",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-9.0.0-beta.21.tgz",
|
||||
"integrity": "sha512-xFOD8I4RB9IkpVKnzoHwHvDNGvGl1IinpYTyQ7o7FAgSnkvP/upI1JtzE5Ff6PlAdyIGnbC+Rz1hJIfmAXxVuQ==",
|
||||
"version": "9.0.0-beta.22",
|
||||
"resolved": "https://registry.npmjs.org/electron/-/electron-9.0.0-beta.22.tgz",
|
||||
"integrity": "sha512-dfqAf+CXXTKcNDj7DU7mYsmx+oZQcXOvJnZ8ZsgAHjrE9Tv8zsYUgCP3JlO4Z8CIazgleKXYmgh6H2stdK7fEA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@electron/get": "^1.0.1",
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
"yazl": "^2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron": "9.0.0-beta.21",
|
||||
"electron": "9.0.0-beta.22",
|
||||
"electron-builder": "22.6.0",
|
||||
"electron-packager": "14.2.1",
|
||||
"electron-rebuild": "1.10.1",
|
||||
|
|
|
@ -611,7 +611,11 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
|||
// unfortunately the two steps can't be combined
|
||||
await node.visitAndLoad(_ => {}, true);
|
||||
|
||||
node.visit(node => node.setExpanded(true), true);
|
||||
node.visit(node => {
|
||||
if (node.isFolder()) {
|
||||
node.setExpanded(true);
|
||||
}
|
||||
}, true);
|
||||
}
|
||||
finally {
|
||||
this.tree.autoLoadingDisabled = false;
|
||||
|
@ -627,7 +631,11 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
|||
}
|
||||
|
||||
this.batchUpdate(() => {
|
||||
node.visit(node => node.setExpanded(false), true);
|
||||
node.visit(node => {
|
||||
if (node.isFolder()) {
|
||||
node.setExpanded(false);
|
||||
}
|
||||
}, true);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue