mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	unified/simplified protecting notes & subtree
This commit is contained in:
		| @@ -186,13 +186,15 @@ async function createTextNote(parentNoteId, title, content = "", params = {}) { | ||||
|     return await createNewNote(params); | ||||
| } | ||||
|  | ||||
| async function protectNoteRecursively(note, protect, taskContext) { | ||||
| async function protectNoteRecursively(note, protect, includingSubTree, taskContext) { | ||||
|     await protectNote(note, protect); | ||||
|  | ||||
|     taskContext.increaseProgressCount(); | ||||
|  | ||||
|     for (const child of await note.getChildNotes()) { | ||||
|         await protectNoteRecursively(child, protect, taskContext); | ||||
|     if (includingSubTree) { | ||||
|         for (const child of await note.getChildNotes()) { | ||||
|             await protectNoteRecursively(child, protect, taskContext); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user