mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	delete notes dialog provides checkbox to switch between delete all clones and normal delete
This commit is contained in:
		| @@ -222,7 +222,7 @@ function eraseDeletedNotesNow() { | ||||
| } | ||||
|  | ||||
| function getDeleteNotesPreview(req) { | ||||
|     const {branchIdsToDelete} = req.body; | ||||
|     const {branchIdsToDelete, deleteAllClones} = req.body; | ||||
|  | ||||
|     const noteIdsToBeDeleted = new Set(); | ||||
|     const branchCountToDelete = {}; // noteId => count (integer) | ||||
| @@ -233,7 +233,7 @@ function getDeleteNotesPreview(req) { | ||||
|  | ||||
|         const note = branch.getNote(); | ||||
|  | ||||
|         if (note.getBranches().length <= branchCountToDelete[branch.branchId]) { | ||||
|         if (deleteAllClones || note.getBranches().length <= branchCountToDelete[branch.branchId]) { | ||||
|             noteIdsToBeDeleted.add(note.noteId); | ||||
|  | ||||
|             for (const childBranch of note.getChildBranches()) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user