mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	Merge branch 'stable'
This commit is contained in:
		
						commit
						f539aedd25
					
				@ -6,6 +6,7 @@ const treeService = require('./tree');
 | 
				
			|||||||
const noteService = require('./notes');
 | 
					const noteService = require('./notes');
 | 
				
			||||||
const repository = require('./repository');
 | 
					const repository = require('./repository');
 | 
				
			||||||
const Branch = require('../entities/branch');
 | 
					const Branch = require('../entities/branch');
 | 
				
			||||||
 | 
					const TaskContext = require("./task_context.js");
 | 
				
			||||||
 | 
					
 | 
				
			||||||
async function cloneNoteToParent(noteId, parentNoteId, prefix) {
 | 
					async function cloneNoteToParent(noteId, parentNoteId, prefix) {
 | 
				
			||||||
    if (await isNoteDeleted(noteId) || await isNoteDeleted(parentNoteId)) {
 | 
					    if (await isNoteDeleted(noteId) || await isNoteDeleted(parentNoteId)) {
 | 
				
			||||||
@ -53,7 +54,7 @@ async function ensureNoteIsAbsentFromParent(noteId, parentNoteId) {
 | 
				
			|||||||
    const branch = await repository.getEntity(`SELECT * FROM branches WHERE noteId = ? AND parentNoteId = ? AND isDeleted = 0`, [noteId, parentNoteId]);
 | 
					    const branch = await repository.getEntity(`SELECT * FROM branches WHERE noteId = ? AND parentNoteId = ? AND isDeleted = 0`, [noteId, parentNoteId]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (branch) {
 | 
					    if (branch) {
 | 
				
			||||||
        await noteService.deleteBranch(branch);
 | 
					        await noteService.deleteBranch(branch, new TaskContext());
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -79,6 +79,7 @@
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <% include dialogs/protected_session_password.ejs %>
 | 
					    <% include dialogs/protected_session_password.ejs %>
 | 
				
			||||||
 | 
					    <% include dialogs/confirm.ejs %>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <div class="dropdown-menu dropdown-menu-sm" id="context-menu-container"></div>
 | 
					    <div class="dropdown-menu dropdown-menu-sm" id="context-menu-container"></div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user