Improve API listDocsByPath param sort (#8156)

* `listDocsByPath` API `sort` param
backend

* `listDocsByPath` API `sort` param
frontend

* `listDocsByPath` API `sort` param
This commit is contained in:
OpaqueGlass 2023-05-02 23:22:40 +08:00 committed by GitHub
parent cb527d7765
commit 6b62a69299
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 22 deletions

View file

@ -21,6 +21,7 @@ import (
"github.com/88250/lute/parse"
"github.com/siyuan-note/siyuan/kernel/filesys"
"github.com/siyuan-note/siyuan/kernel/treenode"
"github.com/siyuan-note/siyuan/kernel/util"
)
func mergeSubDocs(rootTree *parse.Tree) (ret *parse.Tree, err error) {
@ -110,7 +111,7 @@ func loadTreeNodes(box string, p string, level int) (ret []*ast.Node, err error)
}
func buildBlockChildren(block *Block) (err error) {
files, _, err := ListDocTree(block.Box, block.Path, Conf.FileTree.Sort, false, Conf.FileTree.MaxListCount)
files, _, err := ListDocTree(block.Box, block.Path, util.SortModeUnassigned, false, Conf.FileTree.MaxListCount)
if nil != err {
return
}