mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 00:38:49 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
9d9e0c07e8
2 changed files with 12 additions and 12 deletions
|
|
@ -660,7 +660,7 @@ func GetDoc(startID, endID, id string, index int, keyword string, mode int, size
|
|||
luteEngine.RenderOptions.NodeIndexStart = index
|
||||
dom = luteEngine.Tree2BlockDOM(subTree, luteEngine.RenderOptions)
|
||||
|
||||
SetRecentDocByTree(tree)
|
||||
SetRecentDocByTree(id, tree)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,12 +29,12 @@ import (
|
|||
)
|
||||
|
||||
type RecentDoc struct {
|
||||
RootID string `json:"rootID"`
|
||||
Icon string `json:"icon"`
|
||||
Title string `json:"title"`
|
||||
ScrollAttr string `json:"scrollAttr"`
|
||||
Mode string `json:"mode"`
|
||||
Action string `json:"action"`
|
||||
RootID string `json:"rootID"`
|
||||
ID string `json:"id"`
|
||||
Icon string `json:"icon"`
|
||||
Title string `json:"title"`
|
||||
Mode string `json:"mode"`
|
||||
Action string `json:"action"`
|
||||
}
|
||||
|
||||
var recentDocLock = sync.Mutex{}
|
||||
|
|
@ -63,12 +63,12 @@ func RemoveRecentDoc(ids []string) {
|
|||
return
|
||||
}
|
||||
|
||||
func SetRecentDocByTree(tree *parse.Tree) {
|
||||
func SetRecentDocByTree(id string, tree *parse.Tree) {
|
||||
recentDoc := &RecentDoc{
|
||||
RootID: tree.Root.ID,
|
||||
Icon: tree.Root.IALAttr("icon"),
|
||||
Title: tree.Root.IALAttr("title"),
|
||||
ScrollAttr: tree.Root.IALAttr("scroll"),
|
||||
RootID: tree.Root.ID,
|
||||
ID: id,
|
||||
Icon: tree.Root.IALAttr("icon"),
|
||||
Title: tree.Root.IALAttr("title"),
|
||||
}
|
||||
|
||||
SetRecentDoc(recentDoc)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue