Don't show protected notes in shared tree (#2704)

This commit is contained in:
Matt 2022-03-07 17:00:07 -05:00 committed by GitHub
parent eba824a5b1
commit 77ce56ba84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ class Note extends AbstractEntity {
}
getVisibleChildNotes() {
return this.children.filter(childNote => !childNote.hasLabel('shareHiddenFromTree'));
return this.children.filter(childNote => !childNote.hasLabel('shareHiddenFromTree') && !childNote.isProtected);
}
hasChildren() {
@ -67,7 +67,7 @@ class Note extends AbstractEntity {
}
hasVisibleChildren() {
return this.children && !!this.children.find(childNote => !childNote.hasLabel('shareHiddenFromTree'));
return this.children && !!this.children.find(childNote => !childNote.hasLabel('shareHiddenFromTree') && !childNote.isProtected);
}
getChildBranches() {