From 954642023d281c6152e1dd3c74aba1a48891691d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sun, 11 Dec 2022 11:56:41 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E6=94=AF=E6=8C=81=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E5=AD=90=E6=96=87=E6=A1=A3=E5=AF=BC=E5=87=BA=20Word/PDF=20http?= =?UTF-8?q?s://github.com/siyuan-note/siyuan/issues/3219?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/file.go | 2 +- kernel/model/storage.go | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/kernel/model/file.go b/kernel/model/file.go index 2e5f800c3..577e3d628 100644 --- a/kernel/model/file.go +++ b/kernel/model/file.go @@ -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(id, tree) + SetRecentDocByTree(tree) return } diff --git a/kernel/model/storage.go b/kernel/model/storage.go index 4d3520f13..cf6252bae 100644 --- a/kernel/model/storage.go +++ b/kernel/model/storage.go @@ -30,11 +30,8 @@ import ( type RecentDoc struct { 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,10 +60,9 @@ func RemoveRecentDoc(ids []string) { return } -func SetRecentDocByTree(id string, tree *parse.Tree) { +func SetRecentDocByTree(tree *parse.Tree) { recentDoc := &RecentDoc{ RootID: tree.Root.ID, - ID: id, Icon: tree.Root.IALAttr("icon"), Title: tree.Root.IALAttr("title"), }