allow #newNotesOnTop=false to negate previous setting, closes #3796

This commit is contained in:
zadam
2023-04-03 21:08:32 +02:00
parent a0e9ac73c9
commit d100b0dc07
4 changed files with 31 additions and 3 deletions

View File

@@ -23,7 +23,7 @@ const ValidationError = require("../errors/validation_error");
const noteTypesService = require("./note_types");
function getNewNotePosition(parentNote) {
if (parentNote.hasLabel('newNotesOnTop')) {
if (parentNote.isLabelTruthy('newNotesOnTop')) {
const minNotePos = parentNote.getChildBranches()
.reduce((min, note) => Math.min(min, note.notePosition), 0);