🎨 支持笔记本设置独立的排序规则 https://github.com/siyuan-note/siyuan/issues/3623

This commit is contained in:
Liang Ding 2023-02-04 16:31:20 +08:00
parent 4103b380ab
commit 72a8132775
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 10 additions and 0 deletions

View file

@ -233,6 +233,11 @@ func ListDocTree(boxID, path string, sortMode int) (ret []*File, totals int, err
return nil, 0, errors.New(Conf.Language(0))
}
boxConf := box.GetConf()
if util.SortModeFileTree != boxConf.SortMode {
sortMode = boxConf.SortMode
}
var files []*FileInfo
start := time.Now()
files, totals, err = box.Ls(path)