mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
add support for the persistent #sortDirection and #sortFoldersFirst (one time UI action exists), closes #3046
This commit is contained in:
@@ -204,7 +204,11 @@ function sortNotesIfNeeded(parentNoteId) {
|
||||
return;
|
||||
}
|
||||
|
||||
sortNotes(parentNoteId, sortedLabel.value);
|
||||
const sortReversed = parentNote.getLabelValue('sortDirection')?.toLowerCase() === "desc";
|
||||
const sortFoldersFirstLabel = parentNote.getLabel('sortFoldersFirst');
|
||||
const sortFoldersFirst = sortFoldersFirstLabel && sortFoldersFirstLabel.value.toLowerCase() !== "false";
|
||||
|
||||
sortNotes(parentNoteId, sortedLabel.value, sortReversed, sortFoldersFirst);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user