This commit is contained in:
Liang Ding 2022-09-30 22:08:11 +08:00
parent 18ad07d2f4
commit 890d01a368
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
9 changed files with 56 additions and 17 deletions

View file

@ -365,6 +365,10 @@ func ListDocTree(boxID, path string, sortMode int) (ret []*File, totals int, err
sort.Slice(docs, func(i, j int) bool { return docs[i].Size < docs[j].Size })
case util.SortModeSizeDESC:
sort.Slice(docs, func(i, j int) bool { return docs[i].Size > docs[j].Size })
case util.SortModeSubDocCountASC:
sort.Slice(docs, func(i, j int) bool { return docs[i].SubFileCount < docs[j].SubFileCount })
case util.SortModeSubDocCountDESC:
sort.Slice(docs, func(i, j int) bool { return docs[i].SubFileCount > docs[j].SubFileCount })
}
if util.SortModeCustom != sortMode {