mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 20:06:08 +01:00
allow specifiyng sorted attribute (including off for overriding), #2142
This commit is contained in:
@@ -96,12 +96,10 @@ function moveBranchBeforeNote(req) {
|
||||
branchToMove.markAsDeleted();
|
||||
}
|
||||
|
||||
if (parentNote.hasLabel('sorted')) {
|
||||
treeService.sortNotesByTitle(parentNote.noteId, false, false);
|
||||
}
|
||||
else {
|
||||
entityChangesService.addNoteReorderingEntityChange(parentNote.noteId);
|
||||
}
|
||||
treeService.sortNotesIfNeeded(parentNote.noteId);
|
||||
|
||||
// if sorting is not needed then still the ordering might have changed above manually
|
||||
entityChangesService.addNoteReorderingEntityChange(parentNote.noteId);
|
||||
|
||||
return { success: true };
|
||||
}
|
||||
@@ -147,12 +145,10 @@ function moveBranchAfterNote(req) {
|
||||
branchToMove.markAsDeleted();
|
||||
}
|
||||
|
||||
if (parentNote.hasLabel('sorted')) {
|
||||
treeService.sortNotesByTitle(parentNote.noteId, false, false);
|
||||
}
|
||||
else {
|
||||
entityChangesService.addNoteReorderingEntityChange(parentNote.noteId);
|
||||
}
|
||||
treeService.sortNotesIfNeeded(parentNote.noteId);
|
||||
|
||||
// if sorting is not needed then still the ordering might have changed above manually
|
||||
entityChangesService.addNoteReorderingEntityChange(parentNote.noteId);
|
||||
|
||||
return { success: true };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user