mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 19:05:59 +01:00
small refactor
This commit is contained in:
@@ -184,10 +184,8 @@ function sortNotesIfNeeded(parentNoteId) {
|
||||
}
|
||||
|
||||
const sortReversed = parentNote.getLabelValue('sortDirection')?.toLowerCase() === "desc";
|
||||
const sortFoldersFirstLabel = parentNote.getLabel('sortFoldersFirst');
|
||||
const sortFoldersFirst = sortFoldersFirstLabel && sortFoldersFirstLabel.value.toLowerCase() !== "false";
|
||||
const sortNaturalLabel = parentNote.getLabel('sortNatural');
|
||||
const sortNatural = sortNaturalLabel && sortNaturalLabel.value.toLowerCase() !== "false";
|
||||
const sortFoldersFirst = parentNote.isLabelTruthy('sortFoldersFirst');
|
||||
const sortNatural = parentNote.isLabelTruthy('sortNatural');
|
||||
const sortLocale = parentNote.getLabelValue('sortLocale');
|
||||
|
||||
sortNotes(parentNoteId, sortedLabel.value, sortReversed, sortFoldersFirst, sortNatural, sortLocale);
|
||||
|
||||
Reference in New Issue
Block a user