mirror of
https://github.com/zadam/trilium.git
synced 2025-10-30 01:36:24 +01:00
note title widget and protected session entering fixes
This commit is contained in:
@@ -486,7 +486,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
const childBranches = await this.getChildBranches(note);
|
||||
const childBranches = this.getChildBranches(note);
|
||||
|
||||
return childBranches.length > 0;
|
||||
}
|
||||
@@ -497,7 +497,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
|
||||
const noteList = [];
|
||||
|
||||
for (const branch of await this.getChildBranches(parentNote)) {
|
||||
for (const branch of this.getChildBranches(parentNote)) {
|
||||
const node = await this.prepareNode(branch);
|
||||
|
||||
noteList.push(node);
|
||||
@@ -506,7 +506,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
return noteList;
|
||||
}
|
||||
|
||||
async getChildBranches(parentNote) {
|
||||
getChildBranches(parentNote) {
|
||||
let childBranches = parentNote.getChildBranches();
|
||||
|
||||
if (!childBranches) {
|
||||
@@ -521,20 +521,6 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
||||
childBranches = childBranches.filter(branch => !imageLinks.find(rel => rel.value === branch.noteId));
|
||||
}
|
||||
|
||||
if (this.hideArchivedNotes) {
|
||||
const filteredBranches = [];
|
||||
|
||||
for (const childBranch of childBranches) {
|
||||
const childNote = await childBranch.getNote();
|
||||
|
||||
if (!childNote.hasLabel('archived')) {
|
||||
filteredBranches.push(childBranch);
|
||||
}
|
||||
}
|
||||
|
||||
childBranches = filteredBranches;
|
||||
}
|
||||
|
||||
return childBranches;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user