protect/unprotect tree reports progress via notifications

This commit is contained in:
zadam
2019-10-19 09:58:18 +02:00
parent 82bbf4173b
commit 00bb1236ce
4 changed files with 42 additions and 5 deletions

View File

@@ -177,11 +177,13 @@ async function createNote(parentNoteId, title, content = "", extraOptions = {})
return {note, branch};
}
async function protectNoteRecursively(note, protect) {
async function protectNoteRecursively(note, protect, taskContext) {
await protectNote(note, protect);
taskContext.increaseProgressCount();
for (const child of await note.getChildNotes()) {
await protectNoteRecursively(child, protect);
await protectNoteRecursively(child, protect, taskContext);
}
}