mirror of
https://github.com/zadam/trilium.git
synced 2024-11-10 17:13:45 +08:00
small refactor
This commit is contained in:
parent
515c5411a6
commit
c1865f8564
2 changed files with 4 additions and 7 deletions
5
package-lock.json
generated
5
package-lock.json
generated
|
@ -1,12 +1,11 @@
|
|||
{
|
||||
"name": "trilium",
|
||||
"version": "0.61.4-beta",
|
||||
"version": "0.61.5-beta",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "trilium",
|
||||
"version": "0.61.4-beta",
|
||||
"version": "0.61.5-beta",
|
||||
"hasInstallScript": true,
|
||||
"license": "AGPL-3.0-only",
|
||||
"dependencies": {
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue