Merge branch 'stable' into next61

# Conflicts:
#	src/etapi/etapi.openapi.yaml
#	src/etapi/notes.js
#	src/public/app/widgets/type_widgets/editable_text.js
#	src/services/app_info.js
This commit is contained in:
zadam
2023-06-20 23:30:45 +02:00
12 changed files with 86 additions and 37 deletions

View File

@@ -27,11 +27,13 @@ const ws = require("./ws");
function getNewNotePosition(parentNote) {
if (parentNote.isLabelTruthy('newNotesOnTop')) {
const minNotePos = parentNote.getChildBranches()
.filter(branch => branch.noteId !== '_hidden') // has "always last" note position
.reduce((min, note) => Math.min(min, note.notePosition), 0);
return minNotePos - 10;
} else {
const maxNotePos = parentNote.getChildBranches()
.filter(branch => branch.noteId !== '_hidden') // has "always last" note position
.reduce((max, note) => Math.max(max, note.notePosition), 0);
return maxNotePos + 10;