mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
🎨 Improve doc tree Name Alphabet sorting https://github.com/siyuan-note/siyuan/issues/14773
This commit is contained in:
parent
e46c998a6b
commit
b35e21587b
3 changed files with 38 additions and 4 deletions
|
|
@ -148,11 +148,11 @@ func ListNotebooks() (ret []*Box, err error) {
|
|||
switch Conf.FileTree.Sort {
|
||||
case util.SortModeNameASC:
|
||||
sort.Slice(ret, func(i, j int) bool {
|
||||
return util.PinYinCompare(ret[i].Name, ret[j].Name)
|
||||
return util.PinYinCompare4FileTree(ret[i].Name, ret[j].Name)
|
||||
})
|
||||
case util.SortModeNameDESC:
|
||||
sort.Slice(ret, func(i, j int) bool {
|
||||
return util.PinYinCompare(ret[j].Name, ret[i].Name)
|
||||
return util.PinYinCompare4FileTree(ret[j].Name, ret[i].Name)
|
||||
})
|
||||
case util.SortModeAlphanumASC:
|
||||
sort.Slice(ret, func(i, j int) bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue