🎨 支持列出和切换最近打开的文档 https://github.com/siyuan-note/siyuan/issues/3293

This commit is contained in:
Liang Ding 2022-12-10 22:20:55 +08:00
parent ae4272eafb
commit 4cd0e379c5
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -80,7 +80,10 @@ func SetRecentDoc(doc *RecentDoc) (err error) {
}
}
if !update {
recentDocs = append(recentDocs, doc)
recentDocs = append([]*RecentDoc{doc}, recentDocs...)
}
if 32 < len(recentDocs) {
recentDocs = recentDocs[:64]
}
err = setRecentDocs(recentDocs)