mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-17 22:25:29 +01:00
🎨 Supports configuring the maximum number of Recent documents to be listed https://github.com/siyuan-note/siyuan/issues/16720
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
cde0840bf7
commit
827c7a5bf6
27 changed files with 61 additions and 7 deletions
|
|
@ -236,6 +236,13 @@ func InitConf() {
|
|||
Conf.FileTree.CreateDocAtTop = func() *bool { b := true; return &b }()
|
||||
}
|
||||
|
||||
if 1 > Conf.FileTree.RecentDocsMaxListCount {
|
||||
Conf.FileTree.RecentDocsMaxListCount = 32
|
||||
}
|
||||
if 256 < Conf.FileTree.RecentDocsMaxListCount {
|
||||
Conf.FileTree.RecentDocsMaxListCount = 256
|
||||
}
|
||||
|
||||
util.CurrentCloudRegion = Conf.CloudRegion
|
||||
|
||||
if nil == Conf.Tag {
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ func setRecentDocByTree(tree *parse.Tree) {
|
|||
}
|
||||
|
||||
recentDocs = append([]*RecentDoc{recentDoc}, recentDocs...)
|
||||
if 32 < len(recentDocs) {
|
||||
recentDocs = recentDocs[:32]
|
||||
if Conf.FileTree.RecentDocsMaxListCount < len(recentDocs) {
|
||||
recentDocs = recentDocs[:Conf.FileTree.RecentDocsMaxListCount]
|
||||
}
|
||||
|
||||
err = setRecentDocs(recentDocs)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue