mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Clean code
This commit is contained in:
parent
9a72ef1472
commit
0f2e044c7e
3 changed files with 4 additions and 4 deletions
|
|
@ -690,7 +690,7 @@ func fullReindex() {
|
|||
sql.IndexIgnoreCached = false
|
||||
openedBoxes := Conf.GetOpenedBoxes()
|
||||
for _, openedBox := range openedBoxes {
|
||||
index(openedBox.ID)
|
||||
indexBox(openedBox.ID)
|
||||
}
|
||||
LoadFlashcards()
|
||||
debug.FreeOSMemory()
|
||||
|
|
|
|||
|
|
@ -870,7 +870,7 @@ func InitBoxes() {
|
|||
box.UpdateHistoryGenerated() // 初始化历史生成时间为当前时间
|
||||
|
||||
if !initialized {
|
||||
index(box.ID)
|
||||
indexBox(box.ID)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ 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.DatabaseIndex, indexBox, box.ID)
|
||||
task.AppendTask(task.DatabaseIndexRef, IndexRefs)
|
||||
go func() {
|
||||
sql.FlushQueue()
|
||||
|
|
@ -132,7 +132,7 @@ func removeBoxRefs(boxID string) {
|
|||
sql.DeleteBoxRefsQueue(boxID)
|
||||
}
|
||||
|
||||
func index(boxID string) {
|
||||
func indexBox(boxID string) {
|
||||
box := Conf.Box(boxID)
|
||||
if nil == box {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue