Forráskód Böngészése

Merge remote-tracking branch 'origin/dev' into dev

Vanessa 1 éve
szülő
commit
12f3c5264a
2 módosított fájl, 6 hozzáadás és 3 törlés
  1. 1 1
      kernel/conf/editor.go
  2. 5 2
      kernel/model/index.go

+ 1 - 1
kernel/conf/editor.go

@@ -86,7 +86,7 @@ func NewEditor() *Editor {
 		Justify:                         false,
 		RTL:                             false,
 		BacklinkExpandCount:             8,
-		BackmentionExpandCount:          8,
+		BackmentionExpandCount:          -1,
 		Markdown:                        util.MarkdownSettings,
 	}
 }

+ 5 - 2
kernel/model/index.go

@@ -115,10 +115,15 @@ func unindex(boxID string) {
 }
 
 func (box *Box) Index() {
+	task.AppendTask(task.DatabaseIndexRef, removeBoxRefs, box.ID)
 	task.AppendTask(task.DatabaseIndex, index, box.ID)
 	task.AppendTask(task.DatabaseIndexRef, IndexRefs)
 }
 
+func removeBoxRefs(boxID string) {
+	sql.DeleteBoxRefsQueue(boxID)
+}
+
 func index(boxID string) {
 	box := Conf.Box(boxID)
 	if nil == box {
@@ -219,8 +224,6 @@ func IndexRefs() {
 	luteEngine := util.NewLute()
 	boxes := Conf.GetOpenedBoxes()
 	for _, box := range boxes {
-		sql.DeleteBoxRefsQueue(box.ID)
-
 		pages := pagedPaths(filepath.Join(util.DataDir, box.ID), 32)
 		for _, paths := range pages {
 			for _, treeAbsPath := range paths {