mirror of
https://github.com/zadam/trilium.git
synced 2025-10-27 00:06:30 +01:00
expose note hoisting to frontend API, closes #663
This commit is contained in:
@@ -70,7 +70,7 @@ class Branch extends Entity {
|
||||
async beforeSaving() {
|
||||
if (this.notePosition === undefined) {
|
||||
const maxNotePos = await sql.getValue('SELECT MAX(notePosition) FROM branches WHERE parentNoteId = ? AND isDeleted = 0', [this.parentNoteId]);
|
||||
this.notePosition = maxNotePos === null ? 0 : maxNotePos + 1;
|
||||
this.notePosition = maxNotePos === null ? 0 : maxNotePos + 10;
|
||||
}
|
||||
|
||||
if (!this.isDeleted) {
|
||||
|
||||
Reference in New Issue
Block a user