Procházet zdrojové kódy

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

Liang Ding před 2 roky
rodič
revize
56511a96d8
1 změnil soubory, kde provedl 10 přidání a 12 odebrání
  1. 10 12
      kernel/model/storage.go

+ 10 - 12
kernel/model/storage.go

@@ -29,13 +29,12 @@ import (
 )
 
 type RecentDoc struct {
-	RootID     string `json:"rootID"`
-	ID         string `json:"id"`
-	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{}
@@ -66,11 +65,10 @@ func RemoveRecentDoc(ids []string) {
 
 func SetRecentDocByTree(id string, tree *parse.Tree) {
 	recentDoc := &RecentDoc{
-		RootID:     tree.Root.ID,
-		ID:         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)